Showing a pretty ascii git branch topology

If you are using git, you should be branching a lot (it’s encouraged when you use git).  If you have lots of branches (more than two:), you might get a bit lost when it comes to determining the relation between branches.  To ease the pain of the user, git has the git-log command.  I found a great thread here that talks about cool stuff that you can do with the command.

In general, the following command will give you good info:

git log --graph --full-history --color --oneline

The previous command will list all the branches you are tracking in the local machine.  If you want to see these and the branches that are in the remotes you should use the “–all” argument.  If you so desire, you could also use the “–prety=<format>” argument to fully customize your searches. :)

Advertisement

About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in commands, git and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s