我的回购中有一个名为nightly的git branch的问题。当我试图git push
分支时,我收到了一个错误:
! [rejected] nightly -> nightly (non-fast-forward)
error: failed to push some refs to 'https://github.com/Martin819/quoll.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我已经多次遇到过这个问题,所以我认为解决方案是直截了当的。我不得不git pull
。
但是,当我尝试git pull
时,它说:
* branch nightly -> FETCH_HEAD
Already up to date.
所以我尝试用git remote show origin
检查状态并得到:
HEAD branch: master
Remote branches:
master tracked
nightly tracked
Local branches configured for 'git pull':
master merges with remote master
nightly merges with remote nightly
Local refs configured for 'git push':
master pushes to master (up to date)
nightly pushes to nightly (local out of date)
我现在感到很困惑,因为它说当地的分支已经过时了,但是当它试图拉动它时说已经是最新的。无论如何如何解决这个问题?
答案 0 :(得分:0)