Showing posts with label git 복구. Show all posts
Showing posts with label git 복구. Show all posts

git 로컬 내용 덮어쓰기

git 로컬 내용 덮어쓰기

개발을 하다보면 내가 작성한 코드들을
git repository에 있는 최신 내용으로 엎어쓰고 싶을 때가 있다.
(아마 아주 많은 경우에;;)

이럴땐 다음과 같이 하면 된다.

만약 branch 이름이 classic이라면

$ git fetch --all
$ git reset --hard origin/classic



이렇게 하면 git repository의 최신 내용으로 엎어쓰기가 된다.