I try:
git mv a.py b.py src/
and get
fatal: multiple sources for the same target, source=b.py, destination=src/b.py
Using the -n flag, like so git mv -n a.py b.py src/
gives me:
Checking rename of 'a.py' to 'src/b.py'
Checking rename of 'b.py' to 'src/b.py'
fatal: multiple sources for the same target, source=b.py, destination=src/b.py
Am I doing something really stupid? I’m using git version 1.6.6.1
This has been fixed in the current master branch of git, it’s in v1.7.0-rc0 but not in a release build yet.
http://git.kernel.org/?p=git/git.git;a=commit;h=af82559b435aa2a18f38a4f47a93729c8dc543d3
In the mean time the simplest thing to do is to either
git mvthe files individually or to just usemvand then update the index manually, e.g. withgit add -Aif you have appropriate.gitignorepatterns.