Skip to content

Instantly share code, notes, and snippets.

View asemarian's full-sized avatar

Asem Zletni asemarian

View GitHub Profile
@asemarian
asemarian / essential-git.md
Last active September 1, 2023 15:06
A quick summary of the essential Git commands

Basic Terminology

  • Commit: a snapshot that captures the state of your project at a particular point in time.
  • HEAD: a pointer that usually points to the tip of the currently checked out branch.
  • Branch: a series of commits with a pointer that points to the most recent one.
  • Working directory: the local workspace hosting your entire project files and directories and where you experiment with new changes.
  • Staging area: a place where changed files are added before they can be part of the next commit.
  • Repository: the hidden .git directory that is created and used by Git to keep track of changes to your files.
  • Remote: the name of a pointer, typically named "origin," that points to the URL of a cloud-hosted repository.