Menu
Coddy logo textTech

Git Commands

A practical reference to the Git commands you use every day - branching, undoing, merging and rebasing, and syncing with a remote. Each command has its syntax, the flags that matter, and copy-paste examples you can run live in the terminal playground.

Prefer a printable one-pager? See the Git cheat sheet.

Setup & Config

Start a repository and configure Git - init, config, remotes.

Staging & Committing

Record changes into history - add, commit, and amend.

Branching

Create, switch, rename, and delete branches to work on changes in isolation.

Undoing Changes

Recover from mistakes - reset, revert, and undo commits safely.

Merging & Rebasing

Combine work from two branches with merge, rebase, squash, and cherry-pick.

Remotes

Sync your local repo with a remote like GitHub - push, pull, fetch.

Inspecting & Cleanup

See what changed and clean the working tree - status, log, diff, clean.