Git and binary files history

非 Y 不嫁゛ 提交于 2019-12-22 11:35:36

问题


This is a follow up on some similar "answered" questions about git handling binary files and how git can't follow file history very well.

So, git can't properly follow file history. Heck, even git log --follow -M100% --name-only -- path-to-my-file won't do it, and I'm supposedly telling it to only follow files that are 100% similar!

Then we are supposed to use other ways to find who to blame, such as bisecting. Problem here is: those doesn't seem to work with binaries. And accodring to Linus we are unlikely to get a git log --follow fully working any time soon.

In the end my question here is:

Do we have any automated way to enable some kind of git log to follow renamed / moved binaries?

Or maybe is there any similar Version Controlling System but with this functionality?

As an example of a kind of solution, I would accept some safe and simple way of using filter-branch, but I never toyed with it and got no idea how dangerous it might be. Would we be able to pull and push without issues after issuing such a procedure? Can we easily revert it? Can we track the old names / references without reverting? You know, in a versioning system access to history is everything.


回答1:


filter branch is safe. Just don't change anything in the script you provide. I'm annoyed at the -M option too. 100% doesn't work for regular files either. Try it.



来源:https://stackoverflow.com/questions/11351091/git-and-binary-files-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!