I've seen some books and articles have some really pretty looking graphs of git branches and commits. How can I make high-quality printable images of git history?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
In addition to the answer of 'Slipp D. Thompson', I propose you to add this alias to have the same decoration but in a single line by commit :
Based on a Graphviz script I found in an answer to a related question, I've hacked up a ruby script that creates a summary view of a git repository. It elides all linear history and just shows "interesting" commits, i.e. those with multiple parents, multiple children, or pointed to by a branch or tag. Here's a snippet of the graph it generates for jquery:
git-big-picture and BranchMaster are similar tools that try to show only the high-level structure of a graph, by only displaying how tags, branches, merges, etc. are related.
This question has some more options.
This is my take on this matter:
Screenshot:
Usage:
git hist
- Show the history of current branchgit hist --all
- Show the graph of all branches (including remotes)git hist master devel
- Show the relationship between two or more branchesgit hist --branches
- Show all local branchesAdd
--topo-order
to sort commits topologically, instead of by date (default in this alias)Benefits:
--decorate
, so with separate colors for different branch namesSetup:
Try ditaa. It can transform any ASCII diagram into an image. Although is was not designed with Git branches in mind, I was impressed by the results.
Source (txt file):
Command:
Result:
It also supports background colors, dashed lines, different shapes and more. See the examples.
For textual output you can try:
or:
or: here's a graphviz alias for drawing the DAG graph.
I personally use
gitx
,gitk --all
andgitnub
.SourceTree is a really good one. It does print out a good looking and medium size history and branch graph: (the following is done on an experimental Git project just to see some branches). Supports Windows 7+ and Mac OS X 10.6+.
http://www.sourcetreeapp.com/