Software engineer with 10 years experience developing simple & anti-fragile software for high-volume businesses. Improved Mobile App's stability and responsiveness by incorporating patterns & practice
I usually go with git commit --amend when I need to fix or update a commit rather than git resetgit reset --soft HEAD~1, though if you've accidentally added a file to the reporeset` is a much easier fix.
There are also great tools for viewing git blame off the command line, like the built-in tools of WebStorm or GitLens for VS Code.
12 Years Experience in Software Development | 4x AWS Certified | 1x Azure Certified | Multi-Cloud Expert | DevOps & Full Stack Developer | AI ML | Healthcare
Great list! Another command that has saved me countless times is git worktree. It allows you to check out multiple branches simultaneously in separate directories without switching the main working directory. Super useful when reviewing PRs or working on multiple features at once.
For example, to create a new worktree for a feature branch: git worktree add ../feature-branch feature-branch This keeps my workflow seamless without unnecessary stashing or committing unfinished work.
Also, git commit --fixup combined with git rebase -i --autosquash is a game-changer for cleaning up commit history before pushing. It ensures that related changes are automatically grouped when rebasing, keeping the history tidy for team collaboration.
Git has so many hidden gems that make development more efficient. Curious —what’s a lesser-known Git trick that others here swear by?
I am a Computer Teacher at Dev Public School, where I enjoy teaching students and helping them explore the world of technology. My passion lies in making computer learning engaging and accessible.
CSE grad exploring full-stack & AI, learning by building real projects. Passionate about growth, open to SWE opportunities. Still learning, but giving my 100%.
Software Developer skilled in React, Nextjs, Nodejs, Java, HTML5, CSS3 & Material UI. I love building user-centered web applications and am always eager to learn 📚 and collaborate 🤝!
In number 4,
git stash
is the one that stashes your changes so you can safely switch branches e.g. feature-branch -> main branch.git stash pop
"pops" your most recent changes when you come back to the feature-branch so you can pick up where you left off.the first two commands were new to me
huge thanks )
Thanks 👍
Happy to help!
This a great list!
I usually go with
git commit --amend
when I need to fix or update a commit rather thangit reset
git reset --soft HEAD~1, though if you've accidentally added a file to the repo
reset` is a much easier fix.There are also great tools for viewing
git blame
off the command line, like the built-in tools of WebStorm or GitLens for VS Code.Thanks for putting this list together!
Hi Balraj Singh,
Good article, you explain it well.
Checkout the following post to know few more git commands which we shall consider.
dev.to/ramkumar-m-n/19-mind-blowin...
Regards,
Ram
Great list! Another command that has saved me countless times is git worktree. It allows you to check out multiple branches simultaneously in separate directories without switching the main working directory. Super useful when reviewing PRs or working on multiple features at once.
For example, to create a new worktree for a feature branch:
git worktree add ../feature-branch feature-branch
This keeps my workflow seamless without unnecessary stashing or committing unfinished work.
Also, git commit --fixup combined with git rebase -i --autosquash is a game-changer for cleaning up commit history before pushing. It ensures that related changes are automatically grouped when rebasing, keeping the history tidy for team collaboration.
Git has so many hidden gems that make development more efficient. Curious —what’s a lesser-known Git trick that others here swear by?
Thanks!
Very helpful indeed. Thanks for sharing.
Thanks for sharing 🌲
Extremely helpful
Good to know new commands
GitHub desktop does most of the work for me
Definitely saving this for future reference, Thanks for the share
Very useful for me!!
nice!
I used 5 / 10 and must say they are all good stuff. Can wait to use bisect next time. Cool article, thanks.
nice!