小红试着发布功能

一起来看看在小明发布修改后,小红push修改会怎么样?她使用完全一样的push命令:

git push origin master

但她的本地历史已经和中央仓库有分岐了,Git\拒绝操作并给出下面很长的出错消息:

error: failed to push some refs to '/path/to/repo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

这避免了小红覆写正式的提交。她要先pull小明的更新到她的本地仓库合并上她的本地修改后,再重试。

results matching ""

    No results matching ""