Quick Coding Facts
Got 30 seconds? Great — that’s all you need to learn something new!
Recovering a Deleted Git Branch
Did you know you can recover a deleted Git branch?
If you accidentally deleted a local branch, you can bring it back!
git reflog
Find the commit hash where your branch last pointed, then run:
git checkout -b <branch-name> <commit-hash>
Tip: git reflog keeps a record of all recent branch movements – even deleted ones!
GIT: See who changed a specific line
Want to know who last modified a line in a file?
git blame <file>
Perfect for tracking down when and why a change was made.
View your commit history as a graph
Make your commit history visual and easier to follow:
git log --oneline --graph --decorate --all
This command gives you a clean, visual tree of your branches and commits.
GIT: Stash uncommitted changes
Need to switch branches but don’t want to commit yet? This command temporarily saves your work for later:
git stash
Now you can restore your code to the exact state it was in before you stashed it, ready to continue working seamlessly.
git stash pop
This collection of programming coding tips is a quick and easy way to learn something new – perfect for busy developers. No long explanations, no boring theory — just short, useful info in a “Did you know…” style.
You’ll find both basic things every programmer should know (at least in theory – but let’s be honest, our memory isn’t perfect and we often need Google or AI), and some funny or surprising facts that even experienced devs will enjoy.
Whether you’re just starting out, have been coding for years, or just like clicking on smart-looking stuff – there’s something here for you.
Get ready for a smile, a few “ah, now I get it!” moments, and maybe even a “good to know!”.
WARNING: Side effects may include sudden coding inspiration and a strong desire to share what you’ve learned with every developer around you.