본문 바로가기

Git

[Git/에러해결] git에서 강제로 push 하기 (error: failed to push some refs to)

728x90
반응형

 git에서 강제로 push 하기


$ git push -u origin master

를 써서 push를 시도하려고 했는데 에러에 봉착했습니다.


branch를 병합하고 없애고 하는 과정에서 문제가 생겼는지 git에서 에러를 배출하며 push를 막았습니다..ㅠ


데이터가 유실될 수도 있지만 강제로 push 하는 방법으로 해결했습니다.

$ git push -u origin +master

mater 앞에 +를 붙여주면 강제로 push할 수 있습니다.




참고 - https://www.hahwul.com/2016/02/coding-git-push-push-error-failed-to.html


728x90
반응형