I have a huge history and I'm only interested in given commits (say I have a list of 10 commit sha1s). How to start gitk
, that is
gitk --SOMETHING sha123 sha234 sha345 ...
so that only the given commits are rendered in gitk? I know that I can do similar thing with
git log --oneline --no-walk sha123 sha234 sha345 ...
but git log --no-walk
doesn't want to take --graph
. In addition, I'd prefer gitk so that I can view each commit a bit easier. If one or more of the above commits include merge with one or more of the given commits, I'd like to see graph lines between the commits. Basically I'm asking for something like --simplify-everything-but-listed-commits
.
Another good solution would be if somebody can point out how to run gitk like
gitk --simplify-by-decoration --never-simplify-listed-commits sha123 sha234 sha345 ...
because that would render some extra but still process whole history for real. Of course, the flag --never-simplify-listed-commits
doesn't exist. The --simplify-by-decoration ends up NOT rendering any of the given SHA-1s because those do not match any branch or tag.
I also tried hacks such as
gitk sha123..sha123 sha234..sha234 ...
because it seems that gitk is willing to render only given commits with that syntax. However, that only seems to work only for one range at a time. I'd much prefer rendering all commits in a single view.
question from:
https://stackoverflow.com/questions/65848193/how-to-show-only-given-commits-logically-same-as-git-log-no-walk 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…