Git Error

git / sourcetree에서 push할 때 뜨는 에러

집관리사 2019. 12. 1. 18:14

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

에러가 일어난 과정

처음에 push하고 git에서 README.md 를 수정하고 github에서 바로 commit한 후 sourcetree소스트리에서 수정된 파일을 push하려고 할 때 생긴 에러   

 

이유

github에 있는 소스가 로컬에 반영인 안되어서 그런듯

 

해결

pull 한 후에 push

 

pull하니까 이렇게 됐다... 사실 이게 뭔지 아직은 모름