10 Git commands that you did not know that you needed (but you could really use) | By Agada Truelife | April 2025
4 mins read

10 Git commands that you did not know that you needed (but you could really use) | By Agada Truelife | April 2025


Stackademic

4 min read

12 hours ago

Photo by Praveen Thirumurugan on Unsplash

1 and 1 git bisect (Find the source of a bug)

git bisect start
git bisect bad <bad-commit-hash>
git bisect good <good-commit-hash>
# Git will guide you through the process.

2 git stash (Saving temporarily)

git stash
git checkout other-branch
# Do your urgent work
git checkout original-branch
git stash pop

3 and 3 git cherry-pick (Apply specific commits)

git cherry-pick <commit-hash>

4 git reflog (Recovery of lost commits)

git reflog
git checkout <commit-hash>

5 git blame (Tracking code changes)

git blame <file-name>

6. git rebase -i (Interactive rebasing)

git rebase -i HEAD~<number-of-commits>

7 git clean (Deletion of files not followed)

git clean -fd

8 git submodule (Manage external dependencies)

git submodule add <repository-url> <path>

9. git describe (Generate validation descriptions)

git describe

10 git worktree (Work on several branches)

git worktree add <path> <branch-name>



Grpahic Designer