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
I finally solved my original problem by using:
git filter-branch --tree-filter '
if [ -f <old name> ]; then
mv <old name> <new name>
fi' --force HEAD
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.