I have created a folder common with a bunch of source files and folders.
Now I want to move the common folder into the include folder so it looks like include/common
I tried these:
-
git add include -
git mv common/ include/but it fails with this error
fatal: bad source, source=myrepo/common, destination=myrepo/include
-
I tried
git mv common/ include/commonbut I get the same error
Any idea how to achieve this?
One of the nicest things about git is that you don’t need to track file renames explicitly. Git will figure it out by comparing the contents of the files.
So, in your case, don’t work so hard: Ref: Git mv docs
Running
git statusshould show you something like this: