7월5일(수) git Error 해결

Mindfulness·2023년 7월 4일

Node.js 공부하며 처음으로 Node.js파일 생성 및 git 업데이트를 하려고 하였다. 무슨 이유에서인지 계속 에러가 났다. 그 중 아래 에러에서 계속 막혔다. 처음 readme파일 pull을 안 당기고 임의로 파일 업로드를 해서 에러가 난 것 같았다.

Can't push refs to remote. Try running "Pull" first to integrate your changes.
origin and master are entirely different commit histories.

그래서 아래의 명령어를 터미널에 적어 충돌난 부분 수정하여 에러 해결하였다.

git pull --rebase origin branchname
git push origin branchname

profile
Junior Frontend Developer

0개의 댓글