version control - Restore moved file's history in Git -
if file has had it's name , content changed, possible mark move after commit has taken place?
e.g.
file1.txt
changedfile2.txt
, content changed.git commit
- git thinks
file1.txt
has been delete ,file2.txt
unrelated, new file.
is there way flag rename after commit has happened?
no, isn't, because git doesn't rename tracking... rename detection
(based on how similar contents , name of files).
this means
git log --follow file2.txt
follow file history through rename (note: unfortunately not work correctly,--follow
bit of hack),git blame -c -c file2.txt
follow line-wise file history across file renames, content copying , moving across files , inside filegit show -c
show there file rename (you can configure git rename , optionally copy detection when displaying diffs).
hth
Comments
Post a Comment