Rename file for all commits in git repository

前端 未结 2 451
小鲜肉
小鲜肉 2020-12-30 01:07

I want to rename a file for all the commits in git repository, here\'s what I have tried:

git filter-branch --index-filter \'git mv -k  

        
2条回答
  •  忘掉有多难
    2020-12-30 01:27

    For anyone interested in just renaming a file - git rebase -i will work just fine - include the commit that created the file in the rebase, mark it with edit and just rename the file, git will apply the next commits to this file correctly.

提交回复
热议问题