git rebase -i $(HASH)
挂着..永远不会完成。
这是命令
git rebase -i d8c0f59d5d627efb65b47264d5169e3626195839
这样做是为了压缩一些提交。由于它是交互式的 - 它要求打开编辑器的次数是预期的两倍。
然后打印类似的东西
[detached HEAD fc62e0b3] AIRFLOW-1012 -
add run_as_script parameter
Author: Tagar
Date: Sun Mar 19 12:50:50 2017 -0600
2 files changed, 14 insertions(+), 3 deletions(-)
然后..什么也没发生-git rebase
无限期地等待/挂起。
我在 Windows 上使用来自 GitHub 的 git-shell,最新版本。
试图追踪git rebase
如下:
set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 \
GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 \
GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 \
git rebase -i d8c0f59d5d627efb65b47264d5169e3626195839
它在开始挂起之前显示最新的输出:
20:03:58.266245 trace.c:435 performance: 13.236119523 s:
git command:
'C:\Users\myuser1\AppData\Local\GitHubPortableGit_f02737a78695063deace08e96d5042710d3e32db\mingw32\libexec\git-core\git.exe'
'commit' '-n' '--amend' '-F' '.git/SQUASH_MSG' '-e' 20:03:58.293248
run-command.c:350 trace: run_command: 'notes' 'copy'
'--for-rewrite=rebase'
20:03:58.371255 trace.c:333 setup:
git_dir: .git
20:03:58.372255 trace.c:334 setup:
git_common_dir: .git
20:03:58.372255 trace.c:335 setup:
worktree: C:/Users/myuser1/Documents/GitHub/incubator-airflow
20:03:58.372255 trace.c:336 setup: cwd:
C:/Users/myuser1/Documents/GitHub/incubator-airflow
20:03:58.372255 trace.c:337 setup: prefix: (null)
20:03:58.372255 git.c:371 trace: built-in: git 'notes'
'copy' '--for-rewrite=rebase'
20:03:58.372255 trace.c:435
performance: 0.006984451 s: git command:
'C:\Users\myuser1\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\mingw32\libexec\git-core\git.exe'
'notes' 'copy' '--for-rewrite=rebase'
因此,根据跟踪(运行时间 0.0069 秒),执行的最新命令git rebase
是并且它成功了。
之后什么也没有发生。git notes copy --for-rewrite=rebase
我是一个老派的 SVN 并且正在学习 git,但这对我来说似乎是 GitHub 的便携式版本 git 的错误?
PS:我正在尝试这样做strace
,但是 mingw 在 Windows 下的 strace 看起来不是很有用。