🍒 git cherry-pick: steal a commit quietly
Want to take one specific commit from another branch without merging everything? Here's your friend:
git cherry-pick <хеш-коммита>💡 It is useful when the bug has already been fixed in dev, but not yet in main.
🕵️ git bisect: find a bug without burning
A bug appeared — but when? bisect will show you where everything broke:
git bisect start
git bisect bad # current version with bug
git bisect good <hash> # old version without bugsGit itself switches branches and prompts: "Check this." You answer good or bad — and it goes on until it finds the culprit.

💥 git reflog: remote resuscitation
Removed the branch, dropped the commits, did a reset — and panic? Calm down:
git reflogGit remembers everything. You will find the necessary commit and restore it with:
git checkout <hash>🧼 git clean: clean up the garbage
The node_modules folder, temporary files, and cache can all be deleted:
git clean -fd-f— force-d— directories too
It is useful before a push or build.
🧪 git stash: hide changes
When you urgently need to switch to another branch, but the current changes are not ready:
git stashAnd then:
git stash pop🧠 Temporary change storage is convenient when the code is in progress, and you are pulled to a hotfix.
📌 Conclusion
These commands are not well-known to beginners, but they are often used by mid-level and senior users. Master them and Git will become your ally, not your enemy.
💬 Want more git tricks? Write in the comments or check out Kodik Telegram Community - there we share insights, solve problems and learn together.
