Skip to main content

Copilot์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋“œ๋ฒ ์ด์Šค ํƒ์ƒ‰

GitHub Copilot ์ฑ„ํŒ…์€ ์ฝ”๋“œ๋ฒ ์ด์Šค์˜ ์ฝ˜ํ…์ธ , ๊ตฌ์กฐ, ๊ธฐ๋Šฅ์„ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์†Œ๊ฐœ

์ต์ˆ™ํ•˜์ง€ ์•Š์€ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งก๋„๋ก ํ• ๋‹น๋˜์—ˆ๊ฑฐ๋‚˜, ์ฐธ์—ฌํ•˜๊ณ  ์‹ถ์€ ํฅ๋ฏธ๋กœ์šด ์˜คํ”ˆ ์†Œ์Šค ํ”„๋กœ์ ํŠธ๋ฅผ ๋ฐœ๊ฒฌํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค๋ฉด, ๋ณ€๊ฒฝ ์ž‘์—…์„ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ์ฝ”๋“œ๋ฒ ์ด์Šค์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” GitHub Copilot ์ฑ„ํŒ…์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋“œ๋ฒ ์ด์Šค๋ฅผ ํƒ์ƒ‰ํ•˜๊ณ  ํ”„๋กœ์ ํŠธ๋ฅผ ๋น ๋ฅด๊ฒŒ ์•Œ์•„๊ฐ€๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.

Copilot Chat์œผ๋กœ ์ž‘์—…ํ•˜๊ธฐ

์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” GitHub.com์—์„œ Copilot Chat์„ ๋ณด์กฐ ๋ชจ๋“œ๋กœ ์‚ฌ์šฉํ•˜์—ฌ ์ž‘์—…ํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ชจ๋“œ์—์„œ๋Š” GitHub.com์˜ ํ˜„์žฌ ํŽ˜์ด์ง€ ์˜ค๋ฅธ์ชฝ ํ•˜๋‹จ์— Copilot Chat ํŒจ๋„์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

Copilot์˜ ์‘๋‹ต์„ ํ‘œ์‹œํ•  ๊ณต๊ฐ„์„ ๋Š˜๋ฆฌ๋ ค๋ฉด ํŒจ๋„์˜ ๊ฐ€์žฅ์ž๋ฆฌ๋ฅผ ํด๋ฆญํ•˜๊ณ  ๋“œ๋ž˜๊ทธํ•˜์—ฌ Copilot Chat ํŒจ๋„์„ ํ™•์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฏธ๋ฆฌ ์ •์˜๋œ ํ”„๋กฌํ”„ํŠธ ์‚ฌ์šฉ

Copilot Chat์—๋Š” ์ฝ”๋“œ๋ฒ ์ด์Šค ํƒ์ƒ‰์„ ์‹œ์ž‘ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜๋Š” ๋ฏธ๋ฆฌ ์ •์˜๋œ ํ”„๋กฌํ”„ํŠธ ์„ธํŠธ๊ฐ€ ํ•จ๊ป˜ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค. ์ฑ„ํŒ… ํŒจ๋„์—์„œ ๋‹จ์ถ”๋ฅผ ํด๋ฆญํ•˜์—ฌ ํ”„๋กฌํ”„ํŠธ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Copilot Chat์œผ๋กœ ์ƒˆ๋กœ์šด ๋Œ€ํ™”๋ฅผ ์‹œ์ž‘ํ•˜๋ฉด ๋‹จ์ถ”๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ํ”„๋กฌํ”„ํŠธ ์„ ํƒ ํ•ญ๋ชฉ์€ GitHub.com์— ํ˜„์žฌ ํ‘œ์‹œ๋œ ํŽ˜์ด์ง€์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง‘๋‹ˆ๋‹ค.

  1. GitHub.com์—์„œ ํƒ์ƒ‰ํ•˜๋ ค๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์—ฝ๋‹ˆ๋‹ค.

  2. Code ํƒญ์„ ํด๋ฆญํ•˜์—ฌ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ธฐ๋ณธ ํŽ˜์ด์ง€๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

  3. Shift+C๋ฅผ ๋ˆŒ๋Ÿฌ ๋ณด์กฐ ๋ชจ๋“œ์—์„œ Copilot Chat์„ ์—ฝ๋‹ˆ๋‹ค.

  4. ์ฑ„ํŒ… ํŒจ๋„์—์„œ Tell me about this repository ๋‹จ์ถ”๋ฅผ ํด๋ฆญํ•˜์„ธ์š”.

    'Tell me about this repository' ๋‹จ์ถ”๊ฐ€ ๊ฐ•์กฐ ํ‘œ์‹œ๋œ ์ฑ„ํŒ… ํŒจ๋„์˜ ์Šคํฌ๋ฆฐ์ƒท

    ํŒ

    ์ด ๋‹จ์ถ”๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ, ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ธฐ๋ณธ ํŽ˜์ด์ง€์—์„œ ์ž‘์—… ์ค‘์ธ์ง€ ํ™•์ธํ•œ ํ›„, Copilot ํŒจ๋„ ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์— ์žˆ๋Š” ๋”ํ•˜๊ธฐ ๊ธฐํ˜ธ()๋ฅผ ํด๋ฆญํ•˜์—ฌ ์ƒˆ ๋Œ€ํ™”๋ฅผ ์‹œ์ž‘ํ•˜์„ธ์š”.

    ๋ฏธ๋ฆฌ ์ •์˜๋œ ํ”„๋กฌํ”„ํŠธ๊ฐ€ Copilot์— ์ œ์ถœ๋˜๊ณ  ๊ด€๋ จ ์‘๋‹ต์ด ์ฑ„ํŒ… ํŒจ๋„์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

  5. ํ•„์š”์— ๋”ฐ๋ผ ์‘๋‹ต์„ ์ฝ์€ ํ›„ Copilot ํŒจ๋„์˜ ์˜ค๋ฅธ์ชฝ ์œ„์— ์žˆ๋Š” ๋”ํ•˜๊ธฐ ๊ธฐํ˜ธ()๋ฅผ ํด๋ฆญํ•˜์—ฌ ์ƒˆ ๋Œ€ํ™”๋ฅผ ์‹œ์ž‘ํ•œ ๋‹ค์Œ, How to get started with this repository๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ์‹œ ํ”„๋กฌํ”„ํŠธ

๋‹ค์Œ ํ”„๋กฌํ”„ํŠธ๋Š” ์ฝ”๋“œ๋ฒ ์ด์Šค์— ๋Œ€ํ•ด ์•Œ์•„๋‚ด๋Š” ๋ฐ ๋„์›€์ด ๋˜๋Š” Copilot์— ๋ฌผ์–ด๋ณผ ์ˆ˜ ์žˆ๋Š” ์งˆ๋ฌธ ์ข…๋ฅ˜์˜ ์˜ˆ์ž…๋‹ˆ๋‹ค.

์ผ๋ฐ˜์ ์ธ ์งˆ๋ฌธ

  • Based on the code in this repository, give me an overview of the architecture of the codebase. Provide evidence.

  • Which languages are used in this repo? Show the percentages for each language.

  • What are the core algorithms implemented in this repo?

  • What design patterns are used in this repository? Give a brief explanation of each pattern that you find, and an example of code from this repository that uses the pattern, with a link to the file.

ํŠน์ • ์งˆ๋ฌธ

์ด๋Ÿฌํ•œ ์งˆ๋ฌธ์ด ์œ ์šฉํ•œ์ง€ ์—ฌ๋ถ€๋Š” ํƒ์ƒ‰ํ•˜๊ณ  ์žˆ๋Š” ์ฝ”๋“œ๋ฒ ์ด์Šค์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง‘๋‹ˆ๋‹ค.

  • How do I build this project?

  • Where is authentication handled in this codebase?

  • Analyze the code in this repository and tell me about the entry points for this application.

  • Describe the data flow in this application.

  • Analyze the code in this repository and tell me what application-level security mechanisms are employed. Provide references.

๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ํŒŒ์ผ ์ดํ•ด

Copilot์„ ์‚ฌ์šฉํ•˜๋ฉด ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ๋Š” ํŒŒ์ผ ๋˜๋Š” ๊ฐœ๋ณ„ ํŒŒ์ผ์˜ ๋ชฉ์ ์„ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ํŒŒ์ผ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋ ค๋ฉด:

  1. GitHub.com์˜ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™ํ•˜์„ธ์š”.
  2. Shift+C๋ฅผ ๋ˆŒ๋Ÿฌ ๋ณด์กฐ ๋ชจ๋“œ์—์„œ Copilot Chat์„ ์—ฝ๋‹ˆ๋‹ค.
  3. Copilot์—๊ฒŒ Explain the files in this directory๋ฅผ ๋ฌป์Šต๋‹ˆ๋‹ค.

ํŠน์ • ํŒŒ์ผ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋ ค๋ฉด:

  1. GitHub.com์—์„œ ํ•ด๋‹น ํŒŒ์ผ์„ ์—ฝ๋‹ˆ๋‹ค.
  2. Shift+C๋ฅผ ๋ˆŒ๋Ÿฌ ๋ณด์กฐ ๋ชจ๋“œ์—์„œ Copilot Chat์„ ์—ฝ๋‹ˆ๋‹ค.
  3. ์ž‘์€ ํŒŒ์ผ์˜ ๊ฒฝ์šฐ, Copilot์—๊ฒŒ Explain this file์„ ๋ฌป์Šต๋‹ˆ๋‹ค.
  4. ํฐ ํŒŒ์ผ์˜ ๊ฒฝ์šฐ, Explain what this file does. Start with an overview of the purpose of the file. Then, in appropriately headed sections, go through each part of the file and explain what it does in detail.์„ ๋ฌป์Šต๋‹ˆ๋‹ค.

ํŠน์ • ์ฝ”๋“œ ์ค„ ์ดํ•ด

Copilot์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์˜ ํŠน์ • ์ฝ”๋“œ ์ค„์„ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŠน์ • ์ฝ”๋“œ ์ค„์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋ ค๋ฉด ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

  1. GitHub์—์„œ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋กœ ์ด๋™ํ•˜์—ฌ ํŒŒ์ผ์„ ์—ฝ๋‹ˆ๋‹ค.

  2. ์„ ํƒํ•  ์ฒซ ๋ฒˆ์งธ ์ค„์˜ ์ค„ ๋ฒˆํ˜ธ๋ฅผ ํด๋ฆญํ•˜๊ณ  Shift ํ‚ค๋ฅผ ๋ˆ„๋ฅธ ์ฑ„ ์„ ํƒํ•  ๋งˆ์ง€๋ง‰ ์ค„์˜ ์ค„ ๋ฒˆํ˜ธ๋ฅผ ํด๋ฆญํ•˜์—ฌ ์ค„์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  3. ์„ ํƒํ•œ ์ค„์— ๋Œ€ํ•ด ์งˆ๋ฌธํ•˜๋ ค๋ฉด ์„ ํƒ ์˜์—ญ ์˜ค๋ฅธ์ชฝ์— ์žˆ๋Š” Copilot ์•„์ด์ฝ˜()์„ ํด๋ฆญํ•˜์„ธ์š”. ๊ทธ๋Ÿฌ๋ฉด ์„ ํƒํ•œ ์ค„์ด ์งˆ๋ฌธ์˜ ์ปจํ…์ŠคํŠธ๋กœ ํ‘œ์‹œ๋œ GitHub Copilot ์ฑ„ํŒ… ํŒจ๋„์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

  4. ๋ฏธ๋ฆฌ ์ •์˜๋œ ์งˆ๋ฌธ์„ ํ•˜๋ ค๋ฉด Copilot ์•„์ด์ฝ˜ ์˜†์— ์žˆ๋Š” ์•„๋ž˜์ชฝ ํ™”์‚ดํ‘œ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

    ์„ ํƒํ•œ ์ฝ”๋“œ ์˜ค๋ฅธ์ชฝ์— ์ง„ํ•œ ์ฃผํ™ฉ์ƒ‰ ์œค๊ณฝ์„ ์œผ๋กœ ๊ฐ•์กฐ ํ‘œ์‹œ๋œ Copilot ๋ฒ„ํŠผ ์Šคํฌ๋ฆฐ์ƒท

  5. Copilot ์•„์ด์ฝ˜์„ ํด๋ฆญํ•œ ๊ฒฝ์šฐ, ์ฑ„ํŒ… ํŒจ๋„ ์•„๋ž˜์ชฝ์˜ ํ”„๋กฌํ”„ํŠธ ์ƒ์ž์— ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜๊ณ  Enter ํ‚ค๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค.

ํŠน์ • ํŒŒ์ผ ๋˜๋Š” ๊ธฐํ˜ธ ์ดํ•ด

Copilot์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋“œ๋ฒ ์ด์Šค์—์„œ ํŠน์ • ํŒŒ์ผ ๋˜๋Š” ๊ธฐํ˜ธ์˜ ์šฉ๋„๋ฅผ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐํ˜ธ๋Š” ํ•จ์ˆ˜, ํด๋ž˜์Šค ๋˜๋Š” ๋ณ€์ˆ˜์™€ ๊ฐ™์€ ์ฝ”๋“œ์˜ ๋ช…๋ช…๋œ ์—”ํ„ฐํ‹ฐ์ž…๋‹ˆ๋‹ค.

  1. GitHub์˜ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

  2. ํŽ˜์ด์ง€ ์˜ค๋ฅธ์ชฝ ์œ„์—์„œ ์•„์ด์ฝ˜ ์˜†์— ์žˆ๋Š” ์„ ํด๋ฆญํ•œ ๋‹ค์Œ, Assistive๋ฅผ ํด๋ฆญํ•˜์—ฌ Copilot Chat ํŒจ๋„์„ ์—ฝ๋‹ˆ๋‹ค.

  3. ํ”„๋กฌํ”„ํŠธ ์ƒ์ž์—์„œ Attach๋ฅผ ํด๋ฆญํ•œ ๋‹ค์Œ, Files, folders, and symbols๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

  4. ํ•˜๋‚˜ ์ด์ƒ์˜ ํŒŒ์ผ, ํด๋” ๋˜๋Š” ๊ธฐํ˜ธ๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  5. ํ”„๋กฌํ”„ํŠธ ์ƒ์ž์— ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜๊ณ  Enter ํ‚ค๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค.

    Copilot์ด(๊ฐ€) ์ฑ„ํŒ… ํŒจ๋„์— ์‘๋‹ตํ•ฉ๋‹ˆ๋‹ค.

    ํŒ

    ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ์ปจํ…์ŠคํŠธ์—์„œ ์ด์™€ ๊ฐ™์€ ์ž์—ฐ์–ด ์งˆ๋ฌธ์— ๋‹ตํ•  ์ˆ˜ ์žˆ๋Š” Copilot์˜ ๊ธฐ๋Šฅ์€ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ์˜๋ฏธ ์ฒด๊ณ„ ์ฝ”๋“œ ๊ฒ€์ƒ‰ ์ธ๋ฑ์Šค๊ฐ€ ์ตœ์‹ ์ผ ๋•Œ ์ตœ์ ํ™”๋ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Indexing repositories for GitHub Copilot Chat์„(๋ฅผ) ์ฐธ์กฐํ•˜์„ธ์š”.

์ปค๋ฐ‹์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ธฐ

ํ”„๋กœ์ ํŠธ๋ฅผ ์ˆ™์ง€ํ•˜๋Š” ์ข‹์€ ๋ฐฉ๋ฒ• ์ค‘ ํ•˜๋‚˜๋Š” ์ตœ๊ทผ ์ง„ํ–‰๋œ ์ž‘์—…์„ ์‚ดํŽด๋ณด๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ตœ๊ทผ ์ปค๋ฐ‹์„ ํƒ์ƒ‰ํ•˜๋ฉด ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  1. GitHub์—์„œ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ธฐ๋ณธ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

  2. ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ธฐ๋ณธ ํŽ˜์ด์ง€์—์„œ ํŒŒ์ผ ๋ชฉ๋ก ์œ„์— ์žˆ๋Š” ์ปค๋ฐ‹์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

    ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ธฐ๋ณธ ํŽ˜์ด์ง€ ์Šคํฌ๋ฆฐ์ƒท ์‹œ๊ณ„ ์•„์ด์ฝ˜๊ณผ "178๊ฐœ์˜ ์ปค๋ฐ‹"์ด ์ฃผํ™ฉ์ƒ‰ ์œค๊ณฝ์„ ์œผ๋กœ ๊ฐ•์กฐ ํ‘œ์‹œ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  3. ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€๋ฅผ ํด๋ฆญํ•˜๋ฉด ํ•ด๋‹น ์ปค๋ฐ‹์— ๋Œ€ํ•œ Diff ๋ณด๊ธฐ๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

  4. Copilot Chat ํŒจ๋„์— What does this commit do?๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.

  5. ํ•„์š”ํ•œ ๊ฒฝ์šฐ Explain in more detail์„ ์ž…๋ ฅํ•˜์—ฌ ํ›„์† ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Insights ํƒญ ์‚ฌ์šฉ

Copilot์œผ๋กœ ํ”„๋กœ์ ํŠธ์— ์ต์ˆ™ํ•ด์ง€๋Š” ๊ฒƒ ์™ธ์—๋„ GitHub.com์˜ Insights ํƒญ์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๊ฐœ๋žต์ ์ธ ๊ฐœ์š”๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

์ž์„ธํ•œ ๋‚ด์šฉ์€ Pulse๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ํ™œ๋™ ์š”์•ฝ ๋ณด๊ธฐ ๋ฐ ํ”„๋กœ์ ํŠธ์˜ ๊ธฐ์—ฌ์ž ๋ณด๊ธฐ์„(๋ฅผ) ์ฐธ์กฐํ•˜์„ธ์š”.

์ถ”๊ฐ€ ์ฐธ๊ณ  ์ž๋ฃŒ