我想看看给定的提交如何与文件更改的历史相关。
尝试1:
gitk --select-commit=4ca5063196489705643b4b308ad9065d80be50e1 -- Makefile
指定的提交未被选中,根本不包括在内。
尝试2:
git log --no-walk --oneline $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
bf51adc Improve workarounds for building in various environments
9ddeb4d Improve "deb_heavy" target of Makefile
2b8104e Hacks for building on Debian Squeeze
22a9a34 Trailing newline in Makefile
4ca5063 man: Fix container example a bit
cd1a5d0 Debianization...
0149027 Start writing dived(1) man page
985cbac Improve generated Debian package
6875546 Manpage for dive
77c1706 tests: Add tests for non-priv functions
9dfcd8e Remove hacky __MUSL__, use NO_WHATEVER instead
838655e Support compilation with musl-gcc
5d10719 Options to manage capabilities bounding set
a714834 Debian package creation script
a04c85e Implementation of first version of dive
b1ce903 initial example
更好的。包括提交。但我想让它脱颖而出。我也想要一棵树。
尝试 3:
$ git log --graph --no-walk --oneline $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
* bf51adc Improve workarounds for building in various environments
| * 9ddeb4d Improve "deb_heavy" target of Makefile
| | * 2b8104e Hacks for building on Debian Squeeze
| | * 22a9a34 Trailing newline in Makefile
| | * 4ca5063 man: Fix container example a bit
| | * cd1a5d0 Debianization...
| | | * 0149027 Start writing dived(1) man page
| | | * 985cbac Improve generated Debian package
| | | * 6875546 Manpage for dive
| | | | * 77c1706 tests: Add tests for non-priv functions
| | | | | * 9dfcd8e Remove hacky __MUSL__, use NO_WHATEVER instead
| | | | | | * 838655e Support compilation with musl-gcc
| | | | | | | * 5d10719 Options to manage capabilities bounding set
| | | | | | | | * a714834 Debian package creation script
| | | | | | | | | * a04c85e Implementation of first version of dive
| | | | | | | | | * b1ce903 initial example
不是正确的树。--no-walk
并且--graph
不能很好地一起玩。
尝试4:
gitk --no-walk --select-commit=4ca5063196489705643b4b308ad9065d80be50e1 $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
提交被选中。但它现在不按路径过滤。基本上gitk
似乎忽略了--no-walk
。
我该如何正确地做到这一点?