typeblast
Groups
Download
Back to Groups
Development
Git Commands
Frequently used git commands.
MC
mcarter
1
likes
12
snippets
Subscribe
Like
Try it here
Clear
Snippet
;gclean — Clean
;gds — Diff staged
;gac — Add+commit
;gbr — Branch
;gps — Push
;gmain — Main
;gpl — Pull
;gsp — Stash pop
;gamend — Amend
;glog — Log
;gco — Checkout
;gst — Stash
;test — Example: three fill-ins
Loading snippet…
Try a three-field example
Your typing stays in this tab. Nothing is saved or sent.
Snippets (12)
;gclean
Try it ↗
Clean
git branch --merged | grep -v main | xargs git branch -d
;gds
Try it ↗
Diff staged
git diff --staged
;gac
Try it ↗
Add+commit
git add -A && git commit -m ""
;gbr
Try it ↗
Branch
git branch
;gps
Try it ↗
Push
git push
;gmain
Try it ↗
Main
git checkout main
;gpl
Try it ↗
Pull
git pull
;gsp
Try it ↗
Stash pop
git stash pop
;gamend
Try it ↗
Amend
git add -A && git commit --amend --no-edit
;glog
Try it ↗
Log
git log --oneline -20
;gco
Try it ↗
Checkout
git checkout
;gst
Try it ↗
Stash
git stash