์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ

๋งฅ๋ถ์—์„œ ๊นƒํ—ˆ๋ธŒ github์— ์ฝ”๋“œ ์˜ฌ๋ฆฌ๊ธฐ (git ์„ค์น˜)

์ฃผ์˜ ๐Ÿฑ 2022. 10. 17. 14:52
728x90
๋ฐ˜์‘ํ˜•

1. homebrew ์„ค์น˜

 

- ํ„ฐ๋ฏธ๋„์— ๋ณต๋ถ™ํ•˜๋ฉด ์‚ฐ๋‹จํ•œ ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค.(ํŒจ์Šค์›Œ๋“œ๋Š” ๋งฅ๋ถ ๋น„๋ฐ€๋ฒˆํ˜ธ)

https://brew.sh/index_ko

 

Homebrew

The Missing Package Manager for macOS (or Linux).

brew.sh

 

2. git ์„ค์น˜

ํ„ฐ๋ฏธ๋„์—์„œ brew install git 

brew install git

 

์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด, --git version ์œผ๋กœ ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ๋Š”์ง€ ํ™•์ธ ๊ฐ€๋Šฅํ•˜๋‹ค. 

--git version

 

3.ํ„ฐ๋ฏธ๋„์—์„œ cd๋กœ ์—…๋กœ๋“œํ•  ํŒŒ์ผ์ด ์žˆ๋Š” ์œ„์น˜๋กœ ์ด๋™ ํ›„,  git init

git init

์‹คํ–‰๊ฒฐ๊ณผ

4. git add ์œผ๋กœ ํŠน์ •ํŒŒ์ผ ์ถ”๊ฐ€(์˜ˆ)

git add README.md

 

 

5. ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ์ž‘์„ฑ

git commit -m "๋‚ด์šฉ"

 

 

6. remote ๋“ฑ๋ก

git remote add origin ์ž์‹ ์˜ ๊นƒํ—™ ์ฃผ์†Œ

๊นƒํ—™ ์ฃผ์†Œ๋Š” ์—…๋กœ๋“œํ•  ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ์— ๊ฐ€๋ฉด https ์˜†์— ์žˆ๋Š” ์ฃผ์†Œ๋ฅผ ๋ณต๋ถ™ํ•˜๋ฉด ๋œ๋‹ค. 

 

7. push ํ•˜๊ธฐ

git push origin master

master ๋Œ€์‹  ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜๋ช…๋„ ๊ฐ€๋Šฅ

 

โญ๏ธgit push ํ–ˆ๋”๋‹ˆ ํ† ํฐ์ธ์ฆ์—๋Ÿฌ ๋ฐœ์ƒํ•จ

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

 

โญ๏ธํ•ด๊ฒฐ๋ฐฉ๋ฒ•

๊นƒํ—™-Settings - Developer settings - Personal access tokens ์œผ๋กœ ๊ฐ€์„œ ํ† ํฐ ์ƒ์„ฑ

์„ค์ •๊ฐ’์€ ์ž์‹ ์—๊ฒŒ ๋งž๊ฒŒ!

โญ๏ธ ํ† ํฐ ๊ฐ’ ๋ณต์‚ฌ (ํŽ˜์ด์ง€๋ฅผ ๋ฒ—์–ด๋‚˜๋ฉด ๋‹ค์‹œ ๋ณผ ์ˆ˜ ์—†์œผ๋ฏ€๋กœ ๋”ฐ๋กœ ์ž˜ ์ €์žฅํ•ด๋‘์ž)

 

โญ๏ธ ๋‹ค์‹œ git push ์ง„ํ–‰ํ•˜๋ฉด, username์—๋Š” ๊ณ„์ •์ด๋ฆ„, password์—๋Š” ์กฐ๊ธˆ ์ „ ๋ณต์‚ฌํ•œ ํ† ํฐ ๊ฐ’์„ ๋ถ™์—ฌ๋„ฃ์ž

 

๋ฐ˜์‘ํ˜•