拒绝了git push [英] Rejected git push
问题描述
至git@github.com:xxx / xxxxx.git
! [被拒绝] master - > master(非快速转发)
错误:未能将某些参考文献推送到'git@github.com:xxx / xxxxx.git'
为防止您失去历史记录,非快进更新被拒绝
在再次推送之前合并远程更改。有关详细信息,请参阅'git push --help'的'关于
快速转发的注意事项'部分。
当我尝试进行一些更改时,出现此错误。当我尝试从回购中获取时,我得到
从github.com:xxx/xxxxx
*分支大师 - > ; FETCH_HEAD
我应该怎么做才能解决这个问题?到目前为止,基本上只有我在回购,我只有两次推他人。我需要做一个适当的合并?
推送失败,因为您的引用位于远程存储库的后面。提取操作只会取消远程存储库的内容和引用,但不会将您的引用更新为更改。因此,它无法解决阻止推送的问题。您需要执行拉取操作或手动合并本地版本的远程参考。
To git@github.com:xxx/xxxxx.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:xxx/xxxxx.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
I got this error when I tried to push some changes. When I try to fetch from repo i get
From github.com:xxx/xxxxx
* branch master -> FETCH_HEAD
What should I do to solve this ? It's been basically just me on the repo so far, I've had just two pushes from someone else. Do I need to do a proper merge ?
The push is failing because your refs are behind those of the remote repository. The fetch operation only brings down the contents and refs of the remote repository but does not update your refs to the changes. Hence it does nothing to resolve the problem preventing the push. You'll need to either do a pull operation or manual merge with the local version of the remote refs.
这篇关于拒绝了git push的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!