我在master分支(commit)中添加了一个文件,当我想添加另一个文件时:它说
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/XXXX/helloWorld.git'
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.
我真的遇到了这个问题而且我没有背后的逻辑。请告诉我为什么我会看到这个问题以及我该怎么办?
由于
答案 0 :(得分:0)
您尝试将更改推送到不严格位于原始分支前面的分支。
Local: A -> B -> C
Remote: A -> B -> D
您需要提取远程更改(按错误消息的指示)。如果合并正常,则可以按