Information Technology Reference
In-Depth Information
Figure 4-6
.
The git rm --cached command converts one unmodified file into two states denoted as D_ and ??
4-7. Staging and committing a file re-
named with git mv
Problem
Your repository is in a clean state and contains a file named
old-name.txt
. You
want to rename the file
old-name.txt
to
new-name.txt
and commit this opera-
tion.
Solution
Start the repository with:
$ cd git-recipes
$ git init 04-07
$ cd 04-07
$ git simple-commit old-name