본문 바로가기

카테고리 없음

Github Error

error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.

로컬과 원격이 같은 파일을 수정했을 시 나오는 에러.

merge되지 않은 파일이 있어서 pull을 할 수 없다는 뜻이다.

 <해결하는 법>

1) git stash

정상적으로 merge를 못한 파일들에 대한 정보를 확인한다.

2) git commit -am ""

git commit -am "커밋 내용"

git commit --ammend는 직전에 남긴 커밋을 수정하는 지시어다.

git pull 해주고

git push 해주면 잘 된다.