我正嘗試將一個提交推送給原始主服務器。不過,我得到一個錯誤,說我首先需要獲取然後合併,但是我得到這個錯誤後拉。任何想法,將不勝感激。嘗試推送一次提交時發生git錯誤
[email protected] /e/Work/MH (master)
$ git pull
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 14 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (14/14), done.
From file:///V:\
930430f..3a55dca master -> origin/master
Auto-merging project/src/main/java/com/company/project/outgoing/HttpsCallService.java
Merge made by the 'recursive' strategy.
.../java/com/company/project/auth/BcagHmacGenerator.java | 2 +-
.../com/company/project/outgoing/HttpsCallService.java | 16 ++--------------
deployLocal.sh | 2 +-
3 files changed, 4 insertions(+), 16 deletions(-)
[email protected] /e/Work/MH (master)
$ git push origin 72ba712:master
To file:///V:\
! [rejected] 72ba712 -> master (non-fast-forward)
error: failed to push some refs to 'file:///V:\'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
這裏提交的名單,而不是72ba712位置:
[email protected] /e/Work/MH (master)
$ git lol
* eec2ab2 (HEAD, master) Merge branch 'master' of file:///V:\
|\
| * 3a55dca (origin/master) <comments>
* | 72ba712 <comments>
* | bc55eb5 <comments>
* | c2aa448 Merge branch 'master' of file:///V:\
|\ \
| |/
| * 930430f <comments>
* | fc7a55b <comments>
* | fd401a5 <comments>
你肯定沒人推你'git的pull'和你之間的新承諾'git push'?如果存儲庫中有很多活動,這確實可能發生。 –
是的,它只是我們中的兩個,而其他傢伙的電腦都是原產地。他坐在我旁邊,並沒有改變,因爲拉。 – user2569831
您不只是推單提交,特別是當它們不在分支的頂端時。您推送一個或多個包含要推送的提交的分支。 – twalberg