git rebase停止在git for Windows中工作 [英] git rebase stopped working in git for windows
问题描述
我在git rebase中观察到非常奇怪的崩溃。
我正在执行的操作没有改变,但是它们的结果自一段时间以来就已经改变了。
I'm observing very strange crashes in git rebase. Operations that I'm performing haven't change, but their result has changed since some time ago.
我从git那里获得了帮助消息,而不是重新建立分支重新设置基准,描述命令行选项,并使用一些十六进制数字表示文件 bash.exe.stackdump
。
Instead of rebased branch I get help message from git rebase, describing command line options, and file bash.exe.stackdump
with some hex numbers.
相同的行为在执行 git pull --rebase
期间观察到。重新设置拉取的提交是我的默认设置,因此此行为非常令人讨厌。
The same behavior is observed during execution of git pull --rebase
. Rebasing pulled commits is my default setting therefore this misbehavior is very annoying.
示例:
$ git rebase master feature/tune-logging
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
Available options are
-v, --verbose display a diffstat of what changed upstream
-q, --quiet be quiet. implies --no-stat
--autostash automatically stash/stash pop before and after
--fork-point ....
[ skip ... ]
Actions:
--continue continue
--abort abort and check out the original branch
--skip skip current patch and continue
--edit-todo edit the todo list during an interactive rebase
--quit abort but keep HEAD where it is
--show-current-patch show the patch file being applied or merged
我使用Windows 7 x64,具有最新更新。
git版本2.18.0.windows.1
I use Windows 7 x64, with recent updates. git version 2.18.0.windows.1
我还使用SmartGit,运行相同的git可执行文件。
I also use SmartGit, running the same git executable.
这里是通过 GIT_TRACE = 2
$ GIT_TRACE=2 git rebase master feature/tune-logging
11:13:05.925709 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
11:13:05.927709 git.c:654 trace: exec: git-rebase master feature/tune-logging
11:13:05.927709 run-command.c:637 trace: run_command: git-rebase master feature/tune-logging
11:13:06.348751 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:09.354050 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:09.356050 git.c:415 trace: built-in: git rev-parse --git-dir
11:13:09.778092 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:09.779092 git.c:415 trace: built-in: git rev-parse --git-path objects
11:13:10.122126 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:10.123126 git.c:415 trace: built-in: git rev-parse --is-bare-repository
11:13:10.452159 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:10.453159 git.c:415 trace: built-in: git rev-parse --show-toplevel
11:13:10.827196 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:10.829197 git.c:415 trace: built-in: git config --bool rebase.stat
11:13:11.210235 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:11.212235 git.c:415 trace: built-in: git config --bool rebase.autostash
11:13:11.548269 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:11.550269 git.c:415 trace: built-in: git config --bool rebase.autosquash
11:13:11.869301 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:11.871301 git.c:415 trace: built-in: git config --bool commit.gpgsign
11:13:12.330347 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:12.754389 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:13:12.755389 git.c:415 trace: built-in: git rev-parse --parseopt --stuck-long -- -h
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
Available options are
-v, --verbose display a diffstat of what changed upstream
-q, --quiet be quiet. implies --no-stat
--autostash automatically stash/stash pop before and after
[skip ]
分支 master
和 feature / tune-logging
确实存在。
更新。
尝试将git回滚到某些以前的版本。
Tried rolling-back git to some previous version.
-
随意选择的git版本2.12.2可以正常工作,但导致SmartGit抱怨git版本太旧,并建议至少使用2.16版本
Randomly chosen git version 2.12.2 worked fine, but caused complains of the SmartGit about too old git and suggestion to use version at least 2.16
将git升级到2.16.2-相同的崩溃。
Upgraded git to 2.16.2 - same crashes.
更新2 。
我描述了我的实验。
在主机上的一些旧提交上创建一个新分支,添加虚拟文件,提交,删除虚拟文件,提交,重新设置:
Create a new branch on some old commit from the master, add dummy file, commit, delete dummy file, commit, rebase:
--c1--c2--c3--master
\
d1-add dummy file--d2-remove dummy file--
更新3
尝试git版本2.15和2.14。版本2.15给出了相同的崩溃,版本2.14起作用。
Tried git versions 2.15 and 2.14. Version 2.15 gives the same crashes, version 2.14 works.
现在将停止运行,直到崩溃原因得到解决。我将尝试提供有关订购的其他信息。
Will stop on it for now, until the reason of crashes will be resolved. I'll try to provide additional information on order to find it.
UPDATE 4
我通常使用SmartGit(它是git的GUI前端),但是上面的所有结果都是使用命令行获得的。
I usually work with the SmartGit, which is a GUI front-end to git, but all the results above were obtained using command line.
推荐答案
将git更新为2.19,问题已消失。
Updated git to 2.19, the issue has gone.
在安装新git版本时,安装向导显示了两个复选框,要求打开新的实验内置功能:变基和隐藏。
While installing new git version, setup wizard has shown two checkboxes, asking to turn on new experimental built-in features: rebase and stash.
我没有选中它们。
已更新到git 2.19.1.windows.1,现在已打开这些复选框。一切仍然有效。
Updated to git 2.19.1.windows.1, now turned those checkboxes on. Everything still works.
这篇关于git rebase停止在git for Windows中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!