W
webklip
webklip.com/
git-cheat-sheet
0 devices
Public
API
Share
Copy link
Show QR code
Share via apps
This public clip is view-only.
Content
Preview
# Git cheat sheet ## Everyday git status git add -p # stage interactively git commit -m "message" git pull --rebase git push ## Branches git switch -c feature/x # create + switch git switch main git branch -d feature/x # delete local git push -u origin HEAD ## Undo (safe) git restore file.ts # discard working tree changes git restore --staged file.ts git reset --soft HEAD~1 # undo commit, keep changes staged ## Inspect git log --oneline --graph -20 git diff git diff --staged git show HEAD ## Stash git stash push -m "wip" git stash list git stash pop ## Remotes git remote -v git fetch origin git rebase origin/main Tip: prefer `git switch` / `git restore` over older checkout/reset habits for day-to-day work.
Editor
Files
Scan to open
webklip.com/
git-cheat-sheet
Developer docs
Open page
REST API
Webhooks
Loading documentation…