# git — everyday workflow Your git is wired for **delta** diffs (`cheat delta`) and **lazygit** TUI (`lg`, `cheat lazygit`). abbr expands `g`, `gs`, `ga`… as you type (`cheat abbr`). ## Status & inspect - **`gs`** — status (short) · **`git status`** — full - **`gd`** — diff (unstaged) · **`gds`** — diff staged - **`git log --oneline -10`** — recent commits · **`git show `** — a commit ## Stage & commit - **`ga `** — stage · **`ga .`** — stage all · **`git add -p`** — stage hunks - **`gc`** — commit (opens editor) · **`gc -m "msg"`** — inline message - **`git commit --amend`** — fix the last commit (message or add files) ## Branch & switch - **`gco `** — checkout · **`gco -b `** — create + switch - **`gb`** — list branches · **`git switch -`** — back to previous branch - **`git branch -d `** — delete merged · **`-D`** force delete ## Sync with remote - **`gl`** — pull · **`gp`** — push · **`git push -u origin `** — first push - **`git fetch --all --prune`** — refresh remotes, drop gone branches - **`git pull --rebase`** — pull without a merge commit ## Undo (careful) - **`git restore `** — discard unstaged changes to a file - **`git restore --staged `** — unstage (keep changes) - **`git reset --soft HEAD~1`** — undo last commit, keep changes staged - **`git reset --hard `** — DISCARD everything to that ref (destructive) - **`git revert `** — new commit that undoes an old one (safe) ## Stash - **`git stash`** — shelve changes · **`git stash pop`** — bring them back - **`git stash -u`** — include untracked · **`git stash list`** — see all > Visual git: `lg` (lazygit). Prettier diffs: already on via delta.