如何显示触及特定路径的提交树_plus_再提交一次?

时间:2015-09-09 14:05:58

标签: git git-log gitk git-rev-list

我想看看给定提交如何与文件更改历史记录相关。

尝试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

我该如何正确地做到这一点?

0 个答案:

没有答案