Write a commit-graph file containing all commits in the current commit-graph file along with those reachable from HEAD

git commit-graph

git rev-parse {{HEAD}} | git commit-graph write --stdin-commits --append

click the source code to copy install git commit-graph on any operating system with command-not-found.com