I can show the history that changed files at specify hash using Github or Git Tools(SourceTree, SmartGit).
How can I show the history that changed files at specify hash using Git command?
I can show the history that changed files at specify hash using Github or Git Tools(SourceTree, SmartGit).
How can I show the history that changed files at specify hash using Git command?
You can show the commit SHAs which have affected a given file with git-log
and show those changes with git-show
as @joanis suggests:
git log <path>
git show <hash> <path>
You may also show this output using git-diff
. This might be more helpful if you would like to see the changes on a file over multiple commits rather than a single one at the cost of being more verbose:
# changes made by the commit
git diff <hash>~ <hash> <path>
# changes made by the commit and the previous one
git diff <hash>~2 <hash> <path>
See this question for more info about referencing previous commits