How can I move all the files of my current directory into a new directory and retain the history.
I have tried:
git mv . old_app
But I
I think, this is invalid operation you are doing.
You cannot move the current directory (pwd) .
to the other directory which is inside of the current directory. Even mv
command will not work. As the output says
mv: cannot move ‘.’ to ‘someDir/.’: Device or resource busy
Using * in git mv also says
git mv * someDir
fatal: can not move directory into itself, source=curDir, destination=curDir/someDir
Go up one directory level, and select the directories which is to be moved to the target directory. In this case also you cannot make parent directory to move inside child directory. Parent directory contents/files can be made to move to target directory but not the parent directory itself.