Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save grymmjack/250a57a2e61e408e53b73efa58269079 to your computer and use it in GitHub Desktop.
Save grymmjack/250a57a2e61e408e53b73efa58269079 to your computer and use it in GitHub Desktop.
GitHub Desktop vs. git cli Command Comparisons - Cheat Sheet

πŸ§‘β€πŸ’» GitHub Desktop vs Git CLI Cheat Sheet

A quick-reference guide to help you understand what GitHub Desktop is doing behind the scenes β€” and how to do the same with raw Git commands.


πŸ”„ Syncing & Fetching

Action in GitHub Desktop Equivalent Git Command
Fetch git fetch origin
Pull git pull origin <branch>
Push git push origin <branch>

πŸ”€ Branching

Action in GitHub Desktop Equivalent Git Command
Create new branch git checkout -b <new-branch>
Switch branch git checkout <branch>
Rename branch git branch -m <new-name>
Delete local branch git branch -d <branch>
Delete remote branch git push origin --delete <branch>

πŸ”€ Merging & Rebasing

Action in GitHub Desktop Equivalent Git Command
Merge main into current branch git merge origin/main
Rebase current onto main git rebase origin/main
Resolve conflicts Edit files + git add <file>
Finish merge git commit (if needed)

πŸ“„ Changes & Commits

Action in GitHub Desktop Equivalent Git Command
Stage changes git add <file>
Unstage changes git reset <file>
Commit git commit -m "message"
Amend last commit git commit --amend

πŸ“š History & Logs

Action in GitHub Desktop Equivalent Git Command
View commit history git log --oneline --graph --decorate
View changes in a commit git show <commit>
Revert commit git revert <commit>
Checkout old commit git checkout <commit> (detached HEAD)

πŸ•΅οΈ Inspect GitHub Desktop Internals

Task Tip
See raw commands used Open DevTools: Cmd+Opt+I (Mac) / Ctrl+Shift+I (Win/Linux)
Show actual Git repo Right-click repo β†’ "Show in Finder"/"Reveal in Explorer"
Sync CLI + Desktop Just use the same .git repo folder from terminal

πŸ§™ Bonus Tips

  • GitHub Desktop always uses the local .git repo β€” anything you do in CLI will reflect there immediately.
  • You can combine Desktop's UI with CLI power tools (git log, tig, lazygit, etc.)
  • To debug more: try git reflog or git status in terminal after Desktop actions.

Keep this cheat sheet nearby while learning Git β€” and become unstoppable in both UI and terminal workflows!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment