๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

TIL/Git

[Git] git ์•„์ด๋”” ํŒจ์Šค์›Œ๋“œ ์ž…๋ ฅ ์•ˆ ํ•˜๋Š” ๋ฐฉ๋ฒ•

1. ์‚ฌ์šฉ์ž ์ด๋ฆ„, ์ด๋ฉ”์ผ ์ •๋ณด๋ฅผ git config์— ๋“ฑ๋ก

$ git config --global user.name "์ด๋ฆ„"
$ git config --global user.email ์ด๋ฉ”์ผ@mail.com

๋“ฑ๋กํ•ด๋‘๋ฉด commit ์ˆ˜ํ–‰์‹œ ๋“ฑ๋ก๋œ ์‚ฌ์šฉ์ž์˜ ์ •๋ณด๊ฐ€ ํ•จ๊ป˜ ๋ฐ˜์˜

2. Cache๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋งค๋ฒˆ git ์•„์ด๋””, ํŒจ์Šค์›Œ๋“œ ์ž…๋ ฅ ์•ˆํ•˜๋Š” ๋ฐฉ๋ฒ•

$ git config credential.helper store

์ธ์ฆ์„ ์บ์‹œ์— ์ €์žฅํ•˜์—ฌ ์ผ์ •์‹œ๊ฐ„๋™์•ˆ ์ž…๋ ฅํ•˜์ง€ ์•Š๋Š” ๋ฐฉ๋ฒ•

$ git pull 
Username for 'myRepo':
Password for 'myRepo':

์•„์ด๋”” ํŒจ์Šค์›Œ๋“œ ์ž…๋ ฅ

3. ์ž˜ ๋˜์—ˆ๋‚˜ ํ™•์ธ

$ git pull 

๋” ์ด์ƒ ์ž…๋ ฅํ•˜๋ผ๋Š” ๋ง์ด ์—†์œผ๋ฉด ์„ฑ๊ณต

https://webisfree.com/2017-05-19/git-์•„์ด๋””-ํŒจ์Šค์›Œ๋“œ-์ž…๋ ฅ-์•ˆํ•˜๋Š”-๋ฐฉ๋ฒ•