情景很简单,我从主分支中创建了一个名为“myBranch”的分支。我一直在后者上工作。完成一些修改后,我想将本地的更改推送到远程分支“myBranch”。每次尝试时,我都会收到以下错误/警告消息。
To git@github.com:brabbit/projectA.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com: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还很陌生。