Reputation: 63
I moved a .js file from one folder to another manually. Now, although GIT seems to have the complete history log for the file, it still seems to treat the move as a delete/create event. Further, using git BLAME, I cannot go back to track changes beyond the point that I moved the file.
It's been a month or so and many commits since, but I would love to be able to "repair" that history so that GIT treats the entire commit history as the same file, without the cutoff point at the move.. and I would be able to step back using blame to track changes.
Can anyone help with this?
Upvotes: 6
Views: 765
Reputation: 15962
You should use the git-blame -C
flag. This instructs Git to try to figure out where the individual lines actually came from, not just when they were committed. Although this sounds like the same thing, it's different in cases such as yours.
It seems like magic when you use it! Read the manual page for more info.
Upvotes: 5