How do I resolve a GitHub message that says the ti

2020-05-27 04:13发布

I am trying to learn how to use GitHub to version-control my work as I go. (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. I am using GitHub for OSX as my 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: '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?

1条回答
太酷不给撩
2楼-- · 2020-05-27 04:17

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.

查看更多
登录 后发表回答