I just did git rm file1.c
after which git status
shows
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: file1.c
Untracked files:
(use "git add <file>..." to include in what will be committed)
dir/file2.c
dir/file3.c
All well and good so far. But then if I git add dir/file2.c
I get
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
renamed: file1.c -> dir/file2.c
Untracked files:
(use "git add <file>..." to include in what will be committed)
dir/file3.c
Is this a bug or am I doing it wrong? I would expect the new file to be listed as new file. file1.c and file2.c does in no way have similar content [edit] besides for a short copyright notice [\edit].