Basic Concepts and Set Up - ZephyrJW/learn_github GitHub Wiki

Git basic concepts

  • Git uses SHA-1 hash, like 24b9da6552252987aa493b52f8696cd6d3b00373, generated by the CONTENT of the file.

3 Status

  • Committed: changes saved to local database
  • Modified: modified but not saved to local database
  • Staged: mark the current modified files, so to commit later

Configuration

  1. /etc/gitconfig
  2. ~/.gitconfig
  3. .git/config
  • More specific directory will override higher level config files.

Set User Info

git config --global user.name "user_name"
git config --global user.email email_address

Check specified config

git config <key>

Manpage

git help <verb> or
git <verb> --help or
man git-<verb>

⚠️ **GitHub.com Fallback** ⚠️