我的问题与切换分支时的致命Git错误有关.
我尝试使用该命令获取远程分支
git checkout -b local-name origin/remote-name
Run Code Online (Sandbox Code Playgroud)
但我收到此错误消息:
致命:git checkout:更新路径与切换分支不兼容.
您是否打算签出无法解析为提交的"origin/remote-name"?
如果我手动创建一个分支然后拉远程分支,它就可以工作,就像创建一个新的克隆并检查分支一样.
为什么它不适用于我使用的存储库?
我经常至少有3个远程分支:master,staging和production.我有3个本地分支跟踪那些远程分支.
更新我所有的本地分支机构很繁琐:
git fetch --all
git rebase origin/master
git checkout staging
git rebase origin/staging
git checkout production
git rebase origin/production
Run Code Online (Sandbox Code Playgroud)
我很乐意能够做一个"git pull -all",但我无法让它发挥作用.它似乎执行"fetch --all",然后更新(快进或合并)当前工作分支,而不是其他本地分支.
我仍然卡在手动切换到每个本地分支和更新.
我刚为我的windows机器设置了带位桶的git.
Git pull正常工作,git push失败时出现以下错误.
$ git push
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 174.03 KiB | 0 bytes/s, done.
Total 10 (delta 6), reused 0 (delta 0)
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
任何帮助都很有用.
谢谢
有没有办法自动将我的分叉 Github存储库的远程主分支(origin/master)同步到原始 Github存储库的主分支?(upstream/master)
我问,因为我想我的分叉远程 origin/master Github上分支总是熬夜到最新的,这样我可以不需要不断地节省时间拉/变基和推动上游仓库变成我的分叉回购的主分支.
git ×4
bitbucket ×1
git-checkout ×1
git-fork ×1
git-push ×1
github ×1
repository ×1
windows ×1