Programming flashcards

Git Commands Cheat Sheet

Common Git commands for everyday development, commits, branches, and debugging history.

12 cards By @mazo
#git#programming#cli#cheatsheet
Study this deck Browse Programming

Card preview

Card 1 git status

Show changed files and branch state.

Card 2 git add <file>

Stage a file for the next commit.

Card 3 git commit -m "message"

Create a commit with staged changes.

Card 4 git log --oneline

Show compact commit history.

Card 5 git diff

Show unstaged changes.

Card 6 git diff --staged

Show staged changes.

Card 7 git switch -c <branch>

Create and switch to a new branch.

Card 8 git pull

Fetch and integrate changes from the remote branch.