将文件添加到git repo并将其拒绝

时间:2012-11-28 16:56:20

标签: git github

尝试将文件添加到我的仓库以及何时返回被拒绝

! [rejected] master -> master (non-fast-forward) error: failed to push
some refs to 'SITE' hint: Updates were rejected because the tip of
your current branch is behind hint: its remote counterpart. Merge the
remote chsanges (e.g. 'git pull') hint: before pushing again.

我尝试过git pull并且没有更新我的本地文件。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

如果git fetch不起作用,请尝试git pull,然后git rebase,那么您应该可以将更改推送到远程仓库。