In one of my Git repos (I'm using Git 1.9.3 on a Mac) I've moved some files from the root directory to one of the subdirectories. As expected when I run git status
(in the destination subdirectory) it shows the moved files as deleted
from the root directory and the newly added files to the subdirectory as untracked files. I am supposed to do git add --all
to record the changes, but I am getting the following message from Git:
$ git add --all
warning: The behavior of 'git add --all (or -A)' with no path argument from a subdirectory of the tree will change in Git 2.0 and should not be used anymore.
To add content for the whole tree, run:
git add --all :/
(or git add -A :/)
To restrict the command to the current directory, run:
git add --all .
(or git add -A .)
With the current Git version, the command is restricted to the current directory.
What is the difference to the working tree between these two in terms of recording the moved files, and what is the best option in this type of situation?