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 just stumbled across this error message and apparently the solution is quite simple.
But first of all remember there is the mv and the git move.
The normal bash move usage is: mv * ./subDir which will only produce a warning but still move your files.
Whereas the git mv with the usage git mv * ./subDir will produce the fatal error and abort the move:
fatal: can not move directory into itself, source=currentDir/subDir, destination=currentDir/subDir/subDir
The solution to make the git mv work is simple:
git mv -k * ./subDir
The option -k will simply skip all actions that would produce an error.