您的git-filter-branch
咒语看起来是正确的,它应该更新您的存储库本地副本中的所有参考。
这是一个非常相似的演示,显示它按预期正常工作:
$ git clone https://github.com/defunkt/github-gem.git
$ cd github-gem/
$ git filter-branch -f --msg-filter 'sed "s/e/E/g"' --tag-name-filter cat -- --all
...您会看到来自 的输出git-filter-branch
,表明它已更新所有分支和标签(无需git checkout
对它们执行操作):
Rewrite 8ef0c3087d2e5d1f6fe328c06974d787b47df423 (436/436)
Ref 'refs/heads/master' was rewritten
Ref 'refs/remotes/origin/master' was rewritten
Ref 'refs/remotes/origin/fallthrough' was rewritten
Ref 'refs/remotes/origin/gist' was rewritten
Ref 'refs/remotes/origin/keithpitt-ruby-1.9-update' was rewritten
WARNING: Ref 'refs/remotes/origin/master' is unchanged
Ref 'refs/remotes/origin/organizations' was rewritten
Ref 'refs/remotes/origin/upload' was rewritten
Ref 'refs/tags/REL-0.4.2' was rewritten
您从这部分git filter-branch
运行中得到什么输出?