如何将更改推送到github

时间:2016-09-20 01:09:28

标签: git github

我设计我的网络应用程序,现在我想将更改推送到我的回购。

我尝试了SELECT title, release_year FROM sakila.film, sakila.language WHERE language.name = 'french' and film.language_id = language.id 并正确输入了我的userame /密码并收到了此错误:

git push orgin master

所以我尝试了 ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/username/project.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. (成功下载了其他用户添加的更改),然后我重新尝试了git pull orgin master并获得了相同的结果。试。

我也试过

git push orgin master

1 个答案:

答案 0 :(得分:1)

想到这一点的唯一解释是,在您拉动和推动之间,其他人将新提交推送到远程master分支。您可以快速连续尝试以下两个命令:

git pull origin master
git push origin master

请注意,git pull会将远程更改合并到您的本地分支中,但另一种方法是改为:#/ p>

git pull --rebase origin master