3. Git Refs

3.1. Commit Hash

  1. SHA1

  2. SHA1 collisions

  3. Length (40 characters)

  4. Using short hashes

  5. Generating hash

  6. Contains information about whole history

3.2. Refs

  • .git/refs/*

3.4. Branches

3.5. Stating Area

3.6. Reset

$ git reset --hard
$ git reset --soft
$ git reset --mixed

3.7. Revert

$ git reset --hard HEAD