Reputation: 67224
Every time I do a git diff
, despite lot of commits since the first one, it keeps on giving me these old changes that were committed long time ago to do with file deletions.
I deleted an entire folder of stuff in a commit about 7 commits ago, and still on branch or merge, git acts like the deletion is new. Doing git diff
still shows every line of the deleted files as "just having been deleted", as if this is new, but I deleted them many commits ago.
What's going on?
Upvotes: 2
Views: 358
Reputation: 49354
How are you adding files to your index? git add .
won't add deleted files to your index, you've got to either use git add -u
or git rm filename.txt
Upvotes: 6