Git Refs

Commit Hash

  1. SHA1

  2. SHA1 collisions

  3. Length (40 characters)

  4. Using short hashes

  5. Generating hash

  6. Contains information about whole history

Refs

  • .git/refs/*

Branches

Stating Area

Reset

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

Revert

$ git reset --hard HEAD