未能将一些refs推入存储库

时间:2017-11-02 06:25:15

标签: bitbucket git-push

当我点击git命令时,将现有的git存储库添加到bitbucket新创建的存储库

 git push vaibhav master

    To https://bitbucket.org/thevaibhavpatil/notes_by_me.git

     ! [rejected]        master -> master (non-fast-forward)

    error: failed to push some refs to 'https://thevaibhavpatil@bitbucket.org/thevaibhavpatil/notes_by_me.git'

    hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

1 个答案:

答案 0 :(得分:4)

所以试试这个

git stash

git pull origin master
git add .
git commit -m "my message"
git push origin master