該方案很簡單。從主我有一個分支叫myBranch。我一直在後者工作。一旦我完成了一些修改,我想將我的本地副本myBranch的更改推送到遠程分支myBranch。 每次我試試這個,我得到了下面的錯誤/警告消息Git推送分支錯誤
To [email protected]:brabbit/projectA.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:brabbit/projectA.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
所以我用它運行罰款git pull
進行。然後再次嘗試git push
並出現相同的錯誤。
您能否解釋一下這條消息的含義以及如何解決。我對git很陌生。