git rebase停止在git for Windows中工作

wl2*_*776 5 git crash rebase

我在git rebase中观察到非常奇怪的崩溃。我正在执行的操作没有改变,但是它们的结果自前一段时间以来已经改变。

我从git rebase那里获得帮助消息,而不是重新设置分支,描述了命令行选项以及bash.exe.stackdump带有一些十六进制数字的文件。

执行期间观察到相同的行为git pull --rebase。取消拉取的提交是我的默认设置,因此这种不当行为非常令人讨厌。

例:

$ 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
Run Code Online (Sandbox Code Playgroud)

我使用Windows 7 x64,具有最新更新。git版本2.18.0.windows.1

我还使用SmartGit,运行相同的git可执行文件。

这是输出,通过 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 ]
Run Code Online (Sandbox Code Playgroud)

分支masterfeature/tune-logging确实存在。

更新

尝试将git回滚到某些以前的版本。

  1. 随机选择的git版本2.12.2可以正常工作,但是导致SmartGit抱怨git版本太旧,并建议至少使用2.16版本

  2. 将git升级到2.16.2-相同的崩溃。

更新2

我描述我的实验。

在主服务器的一些旧提交上创建一个新分支,添加虚拟文件,提交,删除虚拟文件,提交,重新设置基准:

--c1--c2--c3--master
   \
    d1-add dummy file--d2-remove dummy file--
Run Code Online (Sandbox Code Playgroud)

更新3

尝试git版本2.15和2.14。版本2.15给出了相同的崩溃,版本2.14起作用。

现在将停止运行,直到崩溃的原因得到解决。我将尝试提供有关查找的其他信息。

更新4

我通常使用SmartGit(它是git的GUI前端),但是上面的所有结果都是使用命令行获得的。

wl2*_*776 3

更新git到2.19,问题消失了。

在安装新的 git 版本时,安装向导显示了两个复选框,要求打开新的实验性内置功能:rebase 和 stash。

我没有对它们进行检查。

使用外部变基和存储

更新到 git 2.19.1.windows.1,现在打开这些复选框。一切仍然有效。