Reputation: 28770
I want to move:
./frontend
to ./frontend/application
But when I do git mv -v * ./application
from ./frontend
I get this error:
fatal: can not move directory into itself, source=frontend/application, destination=frontend/application/application
But when I do mv -v * ./application
I get the result I expect.
Upvotes: 1
Views: 745
Reputation: 11595
By doing git mv -v * ./application
, the *
is expanded as all the files in the current folder, application
included.
Git doesn't like to move a folder into itself, but mv
handle it fine.
You have 2 solutions:
Exclude application
when using git mv
:
git mv -v !(application) application # in bash
Move on the filesystem, then index with git:
mv -v * application
git add .
# Git will detect the move
Upvotes: 6