2015-01-26 78 views
0

因此,基本上無論什麼原因,我的主分支與另一個分支合併後,並推動主分支github回購我的代碼充滿了<<<<<<< HEAD 無論出於何種原因,即使在我編輯許多地方犯下前,所以我所做的就是git reset --hard以前的承諾,現在是固定的代碼,當我嘗試我的主分支推到GitHub庫,我得到復位後把主分支推到github存儲庫

! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to 'my github repo' 
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. 

現在做git pull只給我來說這是充滿<<<<<<HEAD代碼我不需要的 。 所以我找了一些解決方案和前幾個結果表明git push -f origin branch但是當我做,我得到

error: src refspec branch does not match any. 
error: failed to push some refs to my github repo 

所以我現在應該做的,小夥子?

回答

0

發現自己

git push origin HEAD --force 

的伎倆。