几周前,我开始使用 git,我喜欢使用它。
但我想知道,为什么我在做 a 时总是被拒绝git push
(推送有效,即使我得到那个错误)。
我有以下设置:
master
\_ development
\_ feature/blog*
现在我正在研究我从开发中创建的功能/博客。当我制作时,git push
我收到以下错误消息:
$ git push
[...]
To [...]@[...]:[...]
288274e..34c17c3 feature/blogs -> feature/blogs
! [rejected] development -> development (non-fast-forward)
error: failed to push some refs to '[...]@[...]:[...]'
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
也行不通。我也收到一条Already up-to-date.
消息。
如何防止该错误?我只想推送当前签出的分支。