본문 바로가기
TIL(Today I learned)/1. github

git pull 덮어쓰기

by dot_Connector 2022. 5. 17.

git pull 덮어쓰기 :: 개발천국 (tistory.com)

 

git pull 덮어쓰기

git pull 덮어쓰기 git pull은 당겨 올때 최신 코드만 당겨오기 때문에, push를 깜빡하고 다시 pull을 하려는 경우에 코드가 일부 안바뀔수 있습니다. 계속 git pull을 해도 update가 되었다고 하는데, 코드

taewooblog.tistory.com

 

집에서 push 한 레지스트리에 있는 file 을 회사에서 pull 하고 싶을 때,

 

블로그에 적힌 내용처럼 git fetch --all 했는데 터미널에 Fetching origin만 뜨고 파일이 업데이트가 안되서,

git reset --hard origin/master 로 하니 터미널에 HEAD is now at 6d99052 update 이렇게 뜨면서회사 file 이 잘 업데이트가 되었다. 

 

 

git 너무 편하다...