Week 3

Summary - John's Notes

Commands

  • git log - Return a navigable list of commits to a repository
  • git log -S "<string>" - Show all commits that either introduced or removed a particular string from the repository
  • git log -S "<string>" <path> - Show all commits that either introduced or removed a particular string from the repository, but restrict the search to a specific path
  • git log HEAD~1..HEAD - Show all commits between HEAD~1 and HEAD, essentially the last commit
  • git diff HEAD~1..HEAD - Show the actual differences between HEAD~1 and HEAD
  • git tag <name> - Create a tag with the given name
  • git tag <name> <commit> - Retrospectively tag a commit with a given name
  • git rev-parse <tag> - Show the commit SHA-1 hash object referred to by the given name

Terminology

  • Branch - A way of working on the same set of code in parallel without modifications overlapping
  • Diff - Shows the actual differences between files
  • Hunk - A section of a diff output

Previous Day

Next Day

 
   
home | download | read now | source | feedback | legal stuff