A list of revision specifications you can use with git log and many other Git commands. Summarized from gitrevisions(7) man page.
     
  
  
    Example usages
  
    
      | git logmaster...develop | inspect differences in branches | 
    
      | git rebase -iHEAD~3 | rebase last 3 commits | 
    
      | git reset --hardHEAD@{2} | undo last operation that changed HEAD | 
    
      | git checkoutv2^{} | checkout the v2tag (notv2branch) | 
  
The 3rd argument in each of these commands is a gitrevision. These gitrevisions can be passed to many Git commands.
Common git revisions
  
    
      | Reference | Description | 
  
  
    
      | git showdae68e1 | sha1 | 
    
      | git showHEAD | reference | 
    
      | git showv1.0.0 | tag | 
  
  
    
      | git showmaster | local branch | 
    
      | git showorigin/master | remote branch | 
  
  
    
      | git showmaster~2 | 2 commits back from master | 
  
  
    
      | git showmaster..fix | reachable from fix but not master | 
    
      | git showmaster...fix | reachable from fix and master, but not both | 
  
These are just the common ones, there’s a lot more below! (These work in many other commands, not just git show.)
Reference
Commits
  
    
      | git checkoutdae68e1 | sha1 | 
  
References
  
    
      | Example | Description | 
  
  
    
      | git checkoutHEAD | reference | 
    
      | git checkoutmaster | branch | 
    
      | git checkoutv1.0.0 | tag | 
  
  
    
      | git checkoutorigin/master | aka, refs/remotes/origin/master | 
    
      | git checkoutheads/master | aka, refs/heads/master | 
  
Searching back
  
    
      | Example | Description | 
  
  
    
      | git checkoutmaster@{yesterday} | also 1 day ago, etc | 
    
      | git checkoutmaster@{2} | 2nd prior value | 
    
      | git checkoutmaster@{push} | where master would push to | 
  
  
    
      | git checkoutmaster^ | parent commit | 
    
      | git checkoutmaster^2 | 2nd parent, eg, what it merged | 
    
      | git checkoutmaster~5 | 5 parents back | 
    
      | git checkoutmaster^0 | this commit; disambiguates from tags | 
  
  
    
      | git checkoutv0.99.8^{tag} | can be commit, tag, tree, object | 
    
      | git checkoutv0.99.8^{} | defaults to {tag} | 
  
  
    
      | git checkout":/fix bug" | searches commit messages | 
  
Other
  
    
      | HEAD:README | … | 
    
      | 0:README | (0 to 3) … | 
  
Ranges
Ranges
  
    
      | git logmaster | reachable parents from master | 
    
      | git log^master | exclude reachable parents from master | 
    
      | git logmaster..fix | reachable from fix but not master | 
    
      | git logmaster...fix | reachable from fix and master, but not both | 
    
      | git logHEAD^@ | parents of HEAD | 
    
      | git logHEAD^! | HEAD, then excluding parents’s ancestors | 
    
      | git logHEAD^{:/fix} | search previous HEADs matching criteria | 
  
Ranges illustration
A ─┬─ E ── F ── G   master
   │
   └─ B ── C ── D   fix
  
    
      | git logmaster..fix | BCD | 
    
      | git logmaster...fix | BCD and EFG | 
  
References