GIT_COMMIT未在index-filter中定义

时间:2017-09-25 16:41:41

标签: git git-filter-branch

好像我的索引过滤器中未定义$ GIT_COMMIT。我希望它是。我错了吗?

$ git filter-branch --index-filter 'if [ $GIT_COMMIT == c69b26453cab89f9833b32a786f551ea18e5ff47 ]; then echo hello world; fi' c69b26453cab89f9833b32a786f551ea18e5ff47^..HEAD

Rewrite 3de628334c72b7b573a9cb2836110a5a8a8b2d70 (1/1) (0 seconds passed, remaining 0 predicted)    /usr/lib/git-core/git-filter-branch: 1: [: 3de628334c72b7b573a9cb2836110a5a8a8b2d70: unexpected operator

0 个答案:

没有答案