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.txtchangedfile2.txt, content changed.git commit- git thinks
file1.txthas been delete ,file2.txtunrelated, 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.txtfollow file history through rename (note: unfortunately not work correctly,--followbit of hack),git blame -c -c file2.txtfollow line-wise file history across file renames, content copying , moving across files , inside filegit show -cshow there file rename (you can configure git rename , optionally copy detection when displaying diffs).
hth
Comments
Post a Comment