์ด๊ฒƒ์ €๊ฒƒ

Mac Os ํ™˜๊ฒฝ์—์„œ Git ์„ค์น˜ํ•˜๊ธฐ / homebrew ์„ค์น˜

HANBEEN 2021. 6. 14. 22:56
๋ฐ˜์‘ํ˜•

๐ŸŒ• ๊ฐœ๋ฐœ์ž๋ผ๋ฉด git๊ณผ github๋ฅผ ๋‹ค๋ฃจ๋Š”๋ฐ ์ต์ˆ™ํ•ด์•ผ ํ•œ๋‹ค๊ณ  ํ•˜๋Š”๋ฐ ๊ณต๋ถ€ํ•  ์ผ์ด ์—†๋‹ค๊ฐ€

์ด๋ฒˆ์— ์Šคํ„ฐ๋””๋ฅผ ํ•˜๋ฉฐ ๋“œ๋””์–ด ์Šคํ„ฐ๋””์›๋“ค๊ณผ ํ•จ๊ป˜ ๊ฐœ๋ฐœํ•˜๋ฉฐ github๋ฅผ ์ด์šฉํ•œ ํ˜‘์—…์„ ๊ฒฝํ—˜ํ•  ๊ฒƒ ๊ฐ™๋‹ค!! ๐Ÿ˜„

๊ทธ ์ค‘ ๊ฐ€์žฅ ๋จผ์ € git์„ ๊ณต๋ถ€ํ•˜๊ณ  ์žˆ๋‹ค

(ํ•ด๋ณด๊ณ  ์‹ถ๋‹ค๋Š” ์ƒ๊ฐ์€ ํ•ญ์ƒ ์žˆ์—ˆ๋Š”๋ฐ ํ•ด๋ณผ ๋งŒํ•œ ์ƒํ™ฉ์ด ์—†์—ˆ๋‹ค..)

 

๊ทธ๋Ÿฌ๋ฉด์„œ git์„ ๋จผ์ € ๊ณต๋ถ€ํ•˜๊ณ  ์žˆ๋Š”๋ฐ ์ด๋ฒˆ์— ๋“œ๋””์–ด ๊ฐ–๊ณ  ์‹ถ๋˜ ๋งฅ๋ถ์œผ๋กœ ๋ฐ”๊ฟ” ๋‹ค์‹œ ์„ค์น˜๋ฅผ ํ•ด๋ณธ๋‹ค 

(์•„์ง์€ ์–ด์ƒ‰ํ•˜๊ธฐ๋งŒ ํ•œ Mac Os..)

 

1. https://git-scm.com

 

Git

 

git-scm.com

๋จผ์ € ์œ„์— git ์‚ฌ์ดํŠธ์— ๊ฐ€์„œ ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ๋„๋ก ํ•œ๋‹ค

 

install homebrew if you don't already have it

๊นƒ์„ ์„ค์น˜ํ•˜๊ธฐ ์ „์— ๋จผ์ € homebrew๋ฅผ ์„ค์น˜ํ•˜๋ผ๊ณ  ๋‚˜์™€์žˆ๋‹ค.

์ฒ˜์Œ ๋“ค์–ด๋ณด๋Š” homebrew.. ์ด๊ฒŒ ๋ญ˜๊นŒ?

 

homebrew๋ž€ Mac Os ์ „์šฉ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋„๊ตฌ์ด๋‹ค.

homebrew๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋‹จ ํ•œ์ค„๋กœ ๋ฒˆ๊ฑฐ๋กœ์šด ์ ˆ์ฐจ ์—†์ด ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค. 

 

๋จผ์ € homebrew๋ฅผ ์„ค์น˜ํ•ด๋ณด์ž

homebrew ๋งํฌ๋ฅผ ๋ˆ„๋ฅด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ์‚ฌ์ดํŠธ๊ฐ€ ์—ด๋ฆฐ๋‹ค

https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

ํ„ฐ๋ฏธ๋„์— ํ•ด๋‹น ๋ฌธ์žฅ์„ ๋ถ™์—ฌ ๋„ฃ์–ด ์„ค์น˜ํ•œ๋‹ค

* ๋งŒ์•ฝ Password๋ฅผ ๋ฌป๋Š” ๋‹ค๋ฉด ์ž…๋ ฅํ•˜๋ฉด ๋œ๋‹ค.

* ์ค‘๊ฐ„์— Press RETURN to continue or any other key to abort ๊ฐ€ ๋‚˜์˜ค๋ฉด enter๋ฅผ ์ณ์„œ ๊ณ„์† ๋‹ค์šด๋กœ๋“œ๋ฅผ ํ•˜์ž! 

* ์ „์—๋Š” ํ„ฐ๋ฏธ๋„์„ Rosetta๋ฅผ ์ด์šฉํ•ด ์—ด์–ด์„œ ์„ค์น˜ํ–ˆ์ง€๋งŒ ๋ฒ„์ „ 3.0.0๋ถ€ํ„ฐ๋Š” m1์„ ์ง€์›ํ•ด ์ฃผ๊ธฐ ๋•Œ๋ฌธ์— ๋”ฐ๋กœ Rosetta๋ฅผ ์ด์šฉํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค๊ณ  ํ•œ๋‹ค.

 

์„ค์น˜ ์™„๋ฃŒ! ํ•˜์ง€๋งŒ PATH ๊ฒฝ๊ณ ๊ฐ€ ๋œฌ๋‹ค

$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<USER_ID>/.zprofile
$ eval "$(/opt/homebrew/bin/brew shellenv)"

์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ผ ๋‘ ๋ฌธ์žฅ์„ ์‹คํ–‰ํ•ด ์ค€๋‹ค

% brew --version
Homebrew 3.1.12
Homebrew/homebrew-core (git revision 08fcf74033; last commit 2021-06-14)

์ž˜ ๊น”๋ฆฐ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค ๐Ÿ˜Ž

 

์ด์ œ homebrew๋ฅผ ์ด์šฉํ•ด ๋‹ค์‹œ git์„ ์„ค์น˜ํ•ด๋ณด์ž!

$ brew install git
% git --version
git version 2.30.1 (Apple Git-130)

git์ด ์ž˜ ๊น”๋ฆฐ ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค 

 

์ด๋ ‡๊ฒŒ ์ด๋Ÿฐ์ €๋Ÿฐ ํ•„์š”ํ•œ ๊ฑธ ๋‹ค์šด๋กœ๋“œํ•˜๊ณ , ๋ธ”๋กœ๊ทธ์— ๊ธ€์„ ์“ฐ๋ฉฐ ์ ์  ๋งฅ์— ์ต์ˆ™ํ•ด์ ธ๊ฐ€๊ณ  ์žˆ์–ด ๊ธฐ๋ถ„์ด ์ข‹๋‹ค ๐Ÿ˜†

๋‚ด์ผ์€ git์„ ์ด์šฉํ•œ ์ด๋Ÿฐ์ €๋Ÿฐ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด๋ณด๊ณ , ๊ณต๋ถ€ํ•ด์•ผ๊ฒ ๋‹ค 

๋ฐ˜์‘ํ˜•