Try โ€‚โ€‰HackMD

Github๊ณผ Copilot์„ค์ • ๋ฐฉ๋ฒ•

slide: https://hackmd.io/@hpmsmt/github-copilot-setup

  • AI ์ฝ”๋”ฉ ํˆด์ธ Copilot์„ ๊ฐœ๋ฐœํŒ€์— ๋„์ž…ํ•˜๊ณ ์ž ๊ฒ€ํ† ์ค‘์ž…๋‹ˆ๋‹ค.

  • ๋จผ์ € ์†Œ์ˆ˜์˜ ์ธ์›์œผ๋กœ ์‚ฌ์šฉํ…Œ์ŠคํŠธํ•ด๋ณด๊ณ  ๊ฒฐ๊ณผ๊ฐ€ ์ข‹์œผ๋ฉด ์ ๊ทน์ ์œผ๋กœ ํ™•์‚ฐํ• ๊นŒ ํ•ฉ๋‹ˆ๋‹ค.

  • ๋งŽ์€ ๋„์›€ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’
์ฃผ์˜์‚ฌํ•ญ : ํšŒ์‚ฌ ๊ทœ์ •์— ๋”ฐ๋ผ ๋ณด์•ˆ ๊ด€๋ จ ์œ ์˜ํ•ด์•ผ ํ•˜๋‹ˆ ๊ผญ ์„ค๋ช…์„ ๋”ฐ๋ผ์ฃผ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค


Copilot?

  • ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ ๊นƒํ—™์—์„œ ๋งŒ๋“  AI ์ฝ”๋”ฉ ํˆด
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • ๋งํฌ
  • ๊ด€๋ จ ์˜์ƒ
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

์œ ์˜ ์‚ฌํ•ญ
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

  • ํšŒ์‚ฌ์˜ ๋ณด์•ˆ ์ •์ฑ…์ƒ ๋งค์šฐ ์ฃผ์˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  • ๊ทธ๋ž˜์„œ ์กฐ๊ธˆ ๋นก์„ธ๊ฒŒ ๊ด€๋ฆฌํ•˜๊ณ ์ž ํ•˜๋‹ˆ ํ•˜๊ธฐ ๋‚ด์šฉ๋“ค์„ ๊ผญ ๋”ฐ๋ผ์ฃผ์„ธ์š”.

ํ™˜๊ฒฝ์„ค์ • 1. Github ๊ฐ€์ž…

์œ ์˜์‚ฌํ•ญ

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

ํ™˜๊ฒฝ์„ค์ • 2. ์ฝ”ํŒŒ์ผ๋Ÿฟ ๊ฐ€์ž…

  • Github ๋กœ๊ทธ์ธํ›„ Copilot ๋งํฌ ์ ‘์† ๋งํฌ
  • 'Start my free trial' ํด๋ฆญ
  • Monthly plan ์„ ํƒํ›„ ์ดˆ๋ก ๋ฒ„ํŠผ ํด๋ฆญ
    • 60์ผ๊ฐ„ ๋ฌด๋ฃŒ์ด๊ณ  ์ดํ›„์—๋Š” 1๋‹ฌ์— 10$์ž…๋‹ˆ๋‹ค. ๋ฒ•์ธ์นด๋“œ๋กœ ํšŒ์‚ฌ์—์„œ ์ง€์›๋ฉ๋‹ˆ๋‹ค.
  • 'Confirm your payment details' ํ™”๋ฉด์—์„œ ์ •๋ณด์ž…๋ ฅํ•˜๊ณ  ์ดˆ๋ก ๋ฒ„ํŠผ ํด๋ฆญ (์•„๋ž˜ ์ฐธ์กฐ)
    • First name : HYUNGGUN
    • Last name : LEE
    • Address (P.O. box, company name, c/o) : Hanwha Presicion Machinary
    • Address line 2 (Apartment, suite, unit) : 6, Panguo-ro 319Beun-gil, Bundang-gu
    • City : Sungnam
    • Postal/Zip code : 13488
    • Country/Region : Korea, South
    • State/Province : Gyeonggi-do
  • 'Confirm your payment details' ํ™”๋ฉด์—์„œ ์‹ ์šฉ์นด๋“œ ์ •๋ณด ์ž…๋ ฅํ›„ ๋…น์ƒ‰๋ฒ„ํŠผ ํด๋ฆญ
    • Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’
      ๋ฐ˜๋“œ์‹œ ๋ฒ•์ธ์นด๋“œ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’
  • ์ตœ์ข…์ ์œผ๋กœ Submit ํด๋ฆญํ•˜๋ฉด ๊ฐ€์ž…์™„๋ฃŒ์ž…๋‹ˆ๋‹ค. ์ค‘์š”ํ•œ ์„ค์ •์ด ๋‚จ์•˜์œผ๋‹ˆ ์•„๋ž˜ํŽ˜์ด์ง€ ๊ผญ ๋ณด์„ธ์š”!

ํ™˜๊ฒฝ ์„ค์ • 3. ์ค‘์š”ํ•œ ์„ค์ •

  • ์•„๋ž˜ ํ™”๋ฉด์—์„œ 'Suggestions matching public code'์˜ Select option์„ ๋ˆŒ๋Ÿฌ Block์œผ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
    • ์ด๊ฑธ Allow๋กœ ํ•˜๋ฉด ๋‹ค๋ฅธ ์‚ฌ๋žŒ ์ฝ”๋“œ๋ฅผ ๊ทธ๋Œ€๋กœ ์ œ์•ˆ๋ฐ›๊ฒŒ ๋˜์–ด ์˜คํ”ˆ์†Œ์Šค ์นจํ•ด์šฐ๋ ค๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ผญ Block์œผ๋กœ ์„ค์ •ํ•ฉ์‹œ๋‹ค.
  • 'Allow GitHub to use my code snippets for product improvements' ๋ฅผ ํ•ด์ œํ•ฉ๋‹ˆ๋‹ค.
    • ์ด๊ฑธ ์ฒดํฌํ•œ์ฑ„๋กœ ๋†”๋‘๋ฉด ๊นƒํ—™์ด ๋‚ด ์ฝ”๋“œ๋ฅผ ๊ฐ€์ ธ๊ฐ‘๋‹ˆ๋‹ค. ๊ผญ ํ•ด์ œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’


ํ™˜๊ฒฝ ์„ค์ • 4. ์—๋””ํ„ฐ ์ต์Šคํ…์…˜ ์„ค์น˜

  • ์ด์ œ Copilot ๊ฐ€์ž…์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
    ์ต์Šคํ…์…˜ ์„ค์น˜ ํ™”๋ฉด์ด ๋‚˜์˜ต๋‹ˆ๋‹ค.
  • ์ง€์›ํ•˜๋Š” ์—๋””ํ„ฐ๋Š” 4๊ฐ€์ง€ ์ž…๋‹ˆ๋‹ค.
    1. Visual Studio Code
    2. Visual Studio
      • Visual Studio๋Š” 2022 Ver17.2 ์ด์ƒ์ด ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.
    3. JetBrains
    4. Neovim
      • NeoVim์€ Neovim ๋ฐ Node.js Ver17 ์ดํ•˜๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.
  • ๋ณธ์ธ์ด ์‚ฌ์šฉํ•˜๋Š” ์—๋””ํ„ฐ๋ฅผ ๋ˆŒ๋Ÿฌ์„œ ์„ค๋ช…์— ๋”ฐ๋ผ ์ต์Šคํ…์…˜์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

ํ™˜๊ฒฝ ์„ค์ • 5. ์‚ฌ์šฉํ•ด๋ณด๊ธฐ

  • ์ œ๊ฐ€ Visual Studio Code๋ฐ–์— ์•ˆ์จ๋ด์„œ ์ด๊ฒƒ๋งŒ ์„ค๋ช…๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๋‹ค๋ฅธ๊ฑฐ ํ•ด๋ณด์‹  ๋ถ„์€ ์—ฌ๊ธฐ์— ๋‚ด์šฉ์„ ์˜ฌ๋ ค์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

  • ์—๋””ํ„ฐ ์‹คํ–‰ํ•˜๋ฉด ๊นƒํ—™ ๋กœ๊ทธ์ธ์„ ์š”๊ตฌํ•ฉ๋‹ˆ๋‹ค. ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.

  • 'self-signed โ€ฆ'ํ•˜๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” Win-CA๋ผ๋Š” ์ต์Šคํ…์…˜์„ ์„ค์น˜ํ•˜๊ณ  ์˜ต์…˜์˜ Inject๋ฅผ append๋กœ ์„ค์ •ํ›„ ์žฌ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. (์ด๋ถ€๋ถ„ ์ž˜ ์•ˆ๋˜๋ฉด ๋ฐ•ํ˜•๊ทผ์—๊ฒŒ ๋ฌผ์–ด๋ณด์„ธ์š”)

  • ์šฐํ•˜๋‹จ์— ํ•˜๊ธฐ ์•„์ด์ฝ˜์ด ๋‚˜์˜ค๋ฉด ์ด์ œ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

    • ๋„๊ณ  ์‹ถ์œผ๋ฉด ์•„์ด์ฝ˜ ํด๋ฆญํ•˜๋ฉด ๋น„ํ™œ์„ฑํ™” ๋ฉ๋‹ˆ๋‹ค.
  • test.js๋ผ๋Š” ํŒŒ์ผ์„ ๋งŒ๋“ค๊ณ  ์•„๋ž˜์™€ ๊ฐ™์ด ์ฃผ์„์„ ์ž…๋ ฅํ•ด๋ด…๋‹ˆ๋‹ค.

// Calculate dates
  • ์ฃผ์„์„ ์ž…๋ ฅํ•˜๊ฑฐ๋‚˜, ํ•จ์ˆ˜ ์ด๋ฆ„์„ ์ ์œผ๋ฉด ๋‚ด์šฉ์„ ์ œ์•ˆํ•ด ์ค๋‹ˆ๋‹ค. ์ œ์•ˆ์„ ์ˆ˜๋ฝํ•˜๋ ค๋ฉด tab์„ ๋ˆ„๋ฅด๋ฉด ๋ฉ๋‹ˆ๋‹ค.
  • ์•„๋ž˜ ๋ช…๋ น์–ด๋งŒ ๊ธฐ์–ตํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
    • TAB : ์ œ์•ˆ ์ˆ˜๋ฝ
    • ESC : ์ œ์•ˆ ์ทจ์†Œ
    • ALT+Enter : ๋ณ„๋„ ์ฐฝ์— 10๊ฐœ ์ œ์•ˆ ๋ณด์—ฌ์ฃผ๊ธฐ
    • Copilot ๋น„ํ™œ์„ฑํ™” ํ•˜๊ธฐ : ํ•˜๋‹จ ์•„์ด์ฝ˜ ํด๋ฆญ
  • ๋” ์ž์„ธํ•œ ์‚ฌ์šฉ๋ฐฉ์•ˆ์€ ํ•˜๊ธฐ ๋งํฌ ์ฐธ๊ณ ํ•˜์„ธ์š”.

์™„๋ฃŒ

  • ์ด์ œ ์—…๋ฌด์— ์‚ฌ์šฉํ•ด ๋ณด์‹œ๊ณ  ํ•œ๋‹ฌ์ฏค ํ›„์— ์‚ฌ์šฉ์†Œ๊ฐ์„ ์•Œ๋ ค์ฃผ์„ธ์š”.
  • ์ฒ˜์Œ์—๋Š” ์ต์ˆ™์น˜ ์•Š์•„ ๋ถˆํŽธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜๋„ ๊ฐ€๋Šฅํ•œ ํ™œ์šฉํ•ด ๋ด ์ฃผ์„ธ์š”.

์˜๊ฒฌ

  • ์˜๊ฒฌ ์žˆ์œผ๋ฉด ์—ฌ๊ธฐ์— ์ ์–ด์ฃผ์„ธ์š”.
    • Edit ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ์ด ๋ฌธ์„œ๋ฅผ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฌธ์„œ๊ฐ€ ์ž˜๋ชป๋œ ๋ถ€๋ถ„์žˆ์œผ๋ฉด ์ˆ˜์ •ํ•ด์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค