Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 747 Bytes

exercise09.md

File metadata and controls

29 lines (16 loc) · 747 Bytes

Exercise 9 - Viewing history

  1. Make a commit with a multi line commit message (leaving an empty line after the first line)

  2. View that commit in the log

     git log -1
    
  3. View the full commit log

     git log
    

If the log fills your whole terminal, press q to exit

  1. View a shortened version of the commit log

     git log --oneline
    
  2. Pick a commit hash from the log

  3. View the commit log from the chosen commit backward

     git log --oneline <commit_hash>
    
  4. How much of the commit hash do you need to specify? Hint, run git help log 88cf350 renamed for style - seems if we just show these characters, we get a message

  5. How can you show just the last three commit messages?