3 ms·
Still, at the point you do a "git mv", it can't be said that git doesn't know you renamed a file. It knows. In fact, after a "git mv foo bar", if you do a "gi
by pmoriarty 8y ago
Still, at the point you do a "git mv", it can't be said that git doesn't know you renamed a file. It knows.
In fact, after a "git mv foo bar", if you do a "git status", you'll see:
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
renamed: foo -> bar
If git chooses afterwards to discard that information and do nothing with that knowledge, that's a separate problem.
- kazinator 8y agoI don't know enough about Git internals in this regard, but it's possible that in fact the index is just being compared to HEAD to infer that information. Index has a file called "bar" and none called "foo". HEAD is vice versa.