📌 Git Cheatsheet for Blog do Marcellini
← Back to the Programming Section 👨💻
1 🚀 Basic update workflow
Check file status
git statusAdd all modified files
git add .Commit with a message
git commit -m "Blog updates"Make sure it’s up to date with remote (rebase helps avoid conflicts)
git pull --rebasePush changes to GitHub
git push
2 🔍 Quick lookups
Show summarized history
git log --oneline --graph --decorate -n 10See differences before commit
git diff
3 🛑 If a rebase goes wrong
Abort ongoing rebase
git rebase --abortContinue after resolving conflicts
git rebase --continue
4 🌐 Check remote (always use SSH)
Show current remote URL
git remote -vIf it shows HTTPS, switch to SSH
git remote set-url origin git@github.com:marcellini-celso/REPO_NAME.git
5 ⚡ Useful configurations (one-time)
Always rebase when pulling
git config --global pull.rebase trueAutomatically stash local changes during rebase
git config --global rebase.autoStash trueShow current branch sorted by last commit
git config --global branch.sort -committerdate
📌 Tip: keep this cheatsheet nearby for quick reference.
It covers 99% of what you’ll use in the update workflow of the PT and EN blogs.
← Back to the Programming Section 👨💻
Blog do Marcellini — Exploring Mathematics, Statistics, and Physics with Rigor and Beauty.
Created by Blog do Marcellini with ❤️ and code.