lab 7 History & aliases

Goals

Getting a listing of what changes have been made is the function of the git log command.

Execute:

git log

You should see …

Output:

$ git log
commit 1e510dbf007cb59998e150d6d4abb3e06d5e9f1a
Author: Jim Weirich <jim (at) neo.com>
Date:   Mon Nov 11 15:10:17 2013 +0100

    Using ARGV

commit 1cc627c31355882d151eb8840edd15bd3c6b1131
Author: Jim Weirich <jim (at) neo.com>
Date:   Mon Nov 11 15:07:26 2013 +0100

    First Commit

Here is a list of the two commits that we have made to the repository so far.

If you want to customize the output of the log command, you can define an alias for this purpose.

Creating an Alias 01

Add the following to the .gitconfig file in your $HOME directory.

File: .gitconfig

[alias]
  hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short

If you want more details about the log command customization, see the "PRETTY FORMATS" section of the "git help log" command.

Table of Contents