Development/Git

[Git] --force !?

안다희 2019. 2. 10. 03:36
728x90

git init

git add README.md

git commit -m "first commit"

git remote add origin https://github.com/daheeahn/aa.git

git push -u origin master


이거대로 하다가 마지막에서 


deg98@dahee MINGW64 /e/0_lilelion7/likelion2 (master)

$ git push -u origin master

To https://github.com/daheeahn/likelion7_daheeahn.git

 ! [rejected]        master -> master (non-fast-forward)

error: failed to push some refs to 'https://github.com/daheeahn/likelion7_daheeahn.git'

hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.



이 오류가 나서 git push -u origin master --force를 했는데 됐다...
왜 한지는 모르겠다,,,


출처: https://mingos-habitat.tistory.com/34 [밍고의서식지:티스토리]