Skip to content

Latest commit

 

History

History
91 lines (70 loc) ยท 4.8 KB

20_github.md

File metadata and controls

91 lines (70 loc) ยท 4.8 KB

GitHub - Remote ์ €์žฅ์†Œ ํ™œ์šฉํ•˜๊ธฐ

  • remote ์ €์žฅ์†Œ๋Š” ์ธํ„ฐ๋„ท์ด๋‚˜ ๋„คํŠธ์›Œํฌ ์–ด๋”˜๊ฐ€์— ์žˆ๋Š” ์ €์žฅ์†Œ๋ฅผ ๋งํ•œ๋‹ค
  • GIT์„ ์‚ฌ์šฉํ•˜๋Š” ๋ชฉ์ ์€ ๋Œ€๋ถ€๋ถ„ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค๊ณผ ํ•จ๊ป˜ ์ผํ•˜๊ธฐ ์œ„ํ•ด์„œ์ด๊ณ , ๊ทธ๋Ÿฌ๋ ค๋ฉด ์„œ๋กœ์˜ ์ž‘์—…๋ฌผ์„ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค
  • ์ด๋Ÿด ๋•Œ GitHub์™€ ๊ฐ™์€ ์˜จ๋ผ์ธ remote ์ €์žฅ์†Œ๋ฅผ ํ™œ์šฉํ•˜๋ฉด, ์‰ฝ๊ณ  ํŽธ๋ฆฌํ•˜๊ฒŒ ์ž‘์—…๋‚ด์šฉ์„ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ๋‹ค


์‹œ์ž‘ํ•˜๊ธฐ ์ „์—

  • github์—์„œ๋Š” 2021-08-13 ๋ถ€๋กœ password ์ž…๋ ฅ์œผ๋กœ ๊ถŒํ•œ์„ ์ธ์ฆํ•˜๋Š” ๋ฐฉ์‹์ด ํ์ง€๋˜์—ˆ๋‹ค
  • ๋•Œ๋ฌธ์— Token ํ˜น์€ SSH๋ฅผ ์ด์šฉํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ์ธ์ฆ์„ ํ•ด์•ผ๋งŒ ํ•œ๋‹ค
  • ์ด ๊ธ€์€ 2021-08-13 ์ด์ „์— ์ž‘์„ฑ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— push์™€ pull์—์„œ password ์ธ์ฆ์œผ๋กœ ์˜ˆ์‹œ๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ๋‹ค
  • ๋”ฐ๋ผ์„œ ์•„๋ž˜ ๋งํฌ๋ฅผ ํ†ตํ•ด Token๊ณผ ssh๋ฅผ ์ด์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ตํ˜€ ์‚ฌ์šฉํ•˜๊ธฐ ๋ฐ”๋ž€๋‹ค
    • Token : ๋งŒ์•ฝ Git์ด ์ฒ˜์Œ์ด๋ผ๋ฉด ์ด ๋ฐฉ๋ฒ•์„ ์ถ”์ฒœํ•œ๋‹ค
    • SSH
remote: Support for password authentication was removed on August 13, 2021.
Please use a personal access token instead.


GitHub Repository ๋งŒ๋“ค๊ธฐ

  • GitHub๋ฅผ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š”, ๊ณ„์ •์„ ๋งŒ๋“  ๋’ค repository๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•œ๋‹ค



Remote ์ €์žฅ์†Œ ํ™•์ธํ•˜๊ณ  ๋“ฑ๋กํ•˜๊ธฐ

  • git remote ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, remote ์ €์žฅ์†Œ๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค
  • ์ €์žฅ์†Œ๋ฅผ ๋“ฑ๋กํ•˜์ง€ ์•Š์•˜๋‹ค๋ฉด, ์•„๋ฌด๊ฒƒ๋„ ๋‚˜์˜ค์ง€ ์•Š๋Š”๋‹ค

  • ์ €์žฅ์†Œ๋ฅผ ๋“ฑ๋กํ•˜๋ ค๋ฉด repository์˜ ์ฃผ์†Œ๋ฅผ ์•Œ์•„์•ผ ํ•œ๋‹ค
  • repository ์ฐฝ์œผ๋กœ ๋Œ์•„๊ฐ€ ์˜ค๋ฅธ์ชฝ์˜ ํด๋ฆฝ๋ณด๋“œ์— ๋ณต์‚ฌ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅธ ํ›„ terminal๋กœ ๋Œ์•„์˜จ๋‹ค
  • ์—ฌ๊ธฐ์„œ git remote add origin ์ฃผ์†Œ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์ž
  • ๋‹จ, ์ด ๊ฒฝ์šฐ์—๋Š” ๋ฐ˜๋“œ์‹œ git pull ์„ ์ด์šฉํ•ด Remote์ €์žฅ์†Œ์™€ ์ง„ํ–‰์‚ฌํ•ญ์„ ๋งž์ถ”์–ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค



Remote ์ €์žฅ์†Œ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณต์‚ฌํ•ด ๊ฐ€์ ธ์˜ค๊ธฐ

  • WARNING! ์œ„์˜ ๋ฐฉ์‹๋Œ€๋กœ ์ด๋ฏธ ํ•˜์˜€๋‹ค๋ฉด, ๋ฐ”๋กœ ์•„๋ž˜๋กœ ๋‚ด๋ ค๊ฐ€์ž
  • git clone์€ ํ˜„์žฌ ํ„ฐ๋ฏธ๋„์ด ์œ„์น˜ํ•œ ๊ณณ์—์„œ remote์ €์žฅ์†Œ ํด๋”๋ฅผ local๋กœ ๊ฐ€์ ธ์˜ค๋Š” ๊ธฐ๋Šฅ์„ ํ•œ๋‹ค
  • git clone ์ฃผ์†Œ ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜์—ฌ remote ์ €์žฅ์†Œ์˜ ๋‚ด์šฉ์„ ๋ณต์‚ฌํ•ด์ฃผ์ž
  • git clone์„ ์ด์šฉํ•˜๋ฉด ๋”ฐ๋กœ git remote add๋ฅผ ํ•  ํ•„์š”๊ฐ€ ์—†์–ด ๋”์šฑ ํŽธ๋ฆฌํ•˜๋‹ค



Remote ์ €์žฅ์†Œ ์‚ญ์ œํ•˜๊ธฐ

  • Remote ์ €์žฅ์†Œ๋ฅผ ์ž˜๋ชป ๋“ฑ๋กํ•œ ๊ฒฝ์šฐ, git remote remove ์ €์žฅ์†Œ๋ฅผ ์ด์šฉํ•ด ์‚ญ์ œํ•˜๋ฉด ๋œ๋‹ค



Remote ์ €์žฅ์†Œ์— commit ์ €์žฅํ•˜๊ธฐ

  • remote ์ €์žฅ์†Œ์— commit์„ ์ €์žฅํ•˜๋ ค๋ฉด git push ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜๋ฉด ๋œ๋‹ค
  • push๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ๋‹ค๋ฉด, GitHub repository์— commit์ด ์ €์žฅ๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค



Remote ์ €์žฅ์†Œ์—์„œ commit ๊ฐ€์ ธ์˜ค๊ธฐ

  • remote ์ €์žฅ์†Œ์— ์ €์žฅ๋œ ์‚ฌํ•ญ์„ ๋ถˆ๋Ÿฌ์˜ค๋ ค๋ฉด git pull ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜๋ฉด ๋œ๋‹ค
  • ๋งŒ์•ฝ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์—†๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋‚˜ํƒ€๋‚œ๋‹ค

  • README.MD ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๋งŒ๋“ค๊ณ , git pull์„ ์‚ฌ์šฉํ•ด๋ณด์ž

  • git log๋ฅผ ํ†ตํ•ด ํ™•์ธํ•ด๋ณด๋ฉด, remote ์ €์žฅ์†Œ๋กœ๋ถ€ํ„ฐ README.MD์˜ commit์„ ๊ฐ€์ ธ์˜จ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค

  • git pull ์ด์™ธ์—๋„, git fetch ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค
  • ์ด ๊ฒฝ์šฐ์—๋Š” ์ถ”๊ฐ€๋œ ๋ถ€๋ถ„์ด merge๊ฐ€ ๋˜์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์— ์ถ”ํ›„์— mergeํ•ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค