Backend and Infrastructure

Moving Through Git History

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

There are a lot of different ways to reference a specific commit in Git. This lesson takes a look at the various ways in which you can navigate through the history of a project by cloning the Drupal core repository from drupal.org and looking at it's contents. We'll learn about pointers to each commit, or what Git refers to as a Treeish, and how we can use those as paramaters to different commands.

The git log alias that Blake is using to pretty-up his log is:
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit --date=relative.

You can find out more about adding Git aliases in Git Aliases and Other Fun Configuration (which will be published on April 10, 2013).

Additional resources

https://git-scm.com/docs/gitrevisions