Git rebase:没有跟踪信息 [英] Git rebase: no tracking information
问题描述
我正在使用 git version 2.9.0.windows.1
,并且想要重新绑定本地存储库(无远程)。
但我总是得到
当前分支没有跟踪信息。
设置这个分支的跟踪信息,你可以这样做:
请指定您想要反转的分支。
详情请参阅git-rebase(1)。
git branch --set-upstream-to = / master
我试过 git rebase -i HEAD〜3
,如这个解决方案,但它在我的情况下不起作用。
如果我简单地将存储库复制到我的Linux机器上,git rebase可以正常工作。
我在两台机器上检查了 git config --list
,它们看起来差不多。
所以我想知道是什么让git rebase在我的Windows机器上无法工作。
更新
我做了一个测试小案例,查看我的历史记录:
git history
和rebase:
git rebase message
无论我在 git rebase
中使用什么选项,我都会收到同样的信息
- 你在一个没有3提交的分支中(但是自第一次提交以来只有2或1个),
- 你不在分支中(detached HEAD:check with
git branch -vv
) - 您受 issue 704 和 issue 710
我添加了
bash.exe
MacType 实用程序排除列表,现在都很好。
I am using git version 2.9.0.windows.1
and I want to rebase a local repository (no remote).
But I always get
There is no tracking information for the current branch. Please specify which branch you want to rebase against. See git-rebase(1) for details.
git rebase
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=/ master
I tried git rebase -i HEAD~3
as suggested in this solution, but it doesn't work in my case.
If I simply copy the repository to my Linux machine, git rebase works fine.
I checked with git config --list
on both machines, they seem almost the same.
So I am wondering what makes git rebase doesn't work on my Windows machine.
UPDATE I did a test for a small case, see my history: git history and rebase: git rebase message
No matter what option I use with git rebase
, I got the same message
git rebase -i HEAD~3
should work unless:
- you are in a branch which has not 3 commits (but only 2 or one since the first commit),
- you are not in a branch (detached HEAD: check with
git branch -vv
) - you are affected by issue 704 and issue 710
I added
bash.exe
to MacType utility exclusion list, now all is good.
这篇关于Git rebase:没有跟踪信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!