Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 922 Bytes

File metadata and controls

75 lines (54 loc) · 922 Bytes

Introduction

Git is a distributed version control system.

Basic concepts

  • repositories
  • working directory
  • commit
  • staging area
  • branch
  • checkout
  • tracked and untracked files

Basic usage

  • Initialize a Git repo
  • Stage
  • Commit
  • Viewing history
  • See what changed

Branching

  • Create a branch
  • Make changes on a branch
  • Switch branches

Remotes

  • Cloning
  • Fetching
  • Pulling
  • Pushing
  • Authentication with SSH keys
  • Multiple remotes

Undoing things

  • Unstaging changes
  • Unmodifying a file
  • Amending commits
  • Reverting commits

Collaboration

  • Merging changes
  • Rebasing changes
  • Cherry-picking changes
  • Feature branches
  • Release branches
  • Commit messages

Project management

  • Tags
  • Gitignore
  • Git config
  • Git hooks

Debugging

  • Git blame
  • Git log
  • Git bisect

Context switching

  • Git stash
  • Git worktrees

Tips and tricks

Git gc Git manual (man git-)