赞
踩
发布到远程存储库时遇到错误:
- Error: failed to push some refs to '..........'
- Error: hint: Updates were rejected because the remote contains work that you do
- hint: not have locally. This is usually caused by another repository pushing
- hint: to the same ref. You may want to first integrate the remote changes
- hint: (e.g., 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
-
- 发布到远程存储库时遇到错误: rejected Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes before pushing again.
输入:
git pull origin master --allow-unrelated-histories
这是一个 Git 命令,它用于将远程仓库(通常是名为 "origin" 的远程仓库)中的更改合并到当前分支,同时允许合并不相关的历史。
当你运行 git pull origin master --allow-unrelated-histories
命令时,你正在告诉 Git 忽略这个 "unrelated histories" 限制,强制将远程分支("origin" 的 "master" 分支)的历史与当前分支合并,即使它们不共享共同的祖先。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。