简体   繁体   English

如何解决GitHub消息,其中显示当前分支的提示位于其远程对应的后面?

[英]How do I resolve a GitHub message that says the tip of my current branch is behind its remote counterpart?

I am trying to learn how to use GitHub to version-control my work as I go. 我正在努力学习如何使用GitHub来控制我的工作。 (I work alone, no collaborators, no different branches, just me backing up my work as I go.) I have set up private Git repositories at BitBucket.org. (我一个人工作,没有合作者,没有不同的分支,只有我在我去的时候备份我的工作。)我在BitBucket.org上建立了私人Git存储库。 I am using GitHub for OSX as my Git GUI. 我使用GitHub for OSX作为我的Git GUI。

But when I make edits to the files in my local Git repository on my hard drive, then use GitHub for OSX to try to "Commit & Sync," I get this error: 但是当我在我的硬盘驱动器上的本地Git存储库中编辑文件时,然后使用GitHub for OSX尝试“提交和同步”,我收到此错误:

git: 'credential-osxkeychain' is not a git command. See 'git --help'.
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
2013-02-12 02:49:07.409 GitHub for Mac Login[44516:707] AskPass with arguments: (
    "/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
    "Password for 'https://username@bitbucket.org': "
)
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
To https://username@bitbucket.org/username/data.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://username@bitbucket.org/username/data.git'
hint: Updates were rejected because the tip of your current branch is behind its remote counterpart. Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' in 'git push --help' for details.
 (256)

(I edited the above to conceal my actual username.) (我编辑了上面的内容以隐藏我的实际用户名。)

What does this mean, how do I resolve it, and how do I avoid getting it in the future? 这是什么意思,我该如何解决它,以及如何避免将来获得它?

Someone (or you) have updated the remote branch. 有人(或您)已更新远程分支。 That causes your remote branch become ahead of your current branch. 这会导致您的远程分支超越当前分支。 (that is your local branch) (那是你当地的分公司)

I suggest you to git pull --rebase origin master and push after that. 我建议你git pull --rebase origin master并在那之后push

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GitHub更新被拒绝,因为当前分支的提示位于其远程对应的后面 - GitHub updates were rejected because the tip of current branch is behind its remote counterpart 推送到远程失败,因为“当前分支的尖端位于其远程对应部分之后” - Pushing to remote fails because “tip of your current branch is behind its remote counterpart” 当前分支落后于其远程分支 - Current branch is behind its remote counterpart GitLab 更新被拒绝,因为您当前分支的尖端落后于其远程对应分支 - GitLab Updates were rejected because the tip of your current branch is behind its remote counterpart Git 推送错误“您当前分支的提示落后于其远程对应分支” - Git push error "tip of your current branch is behind its remote counterpart" 更新被拒绝,因为你当前分支的尖端落后于它的远程分支 - Updates were rejected because the tip of your current branch is behind its remote counterpart 如何修复Git中的问题:“更新被拒绝,因为推送的分支提示位于其远程对应的后面” - How to fix issue in Git: “Updates were rejected because a pushed branch tip is behind its remote counterpart” git-我需要推送我的最新更改,并得到我的分支提示落后于远程对等方的错误 - git - I need to push my latest changes and get error that my branch tip is behind remote counterpart git push错误:当前分支位于其远程对应对象的后面 - git push error: current branch is behind its remote counterpart git 推送 - 更新被拒绝,因为当前分支的尖端落后于远程对应 - git push - updates rejected because tip of current branch behind remote counterpart
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM