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

12 hours ago
We all had these moments to look at the command line, asking ourselves if there is a easier way to repair an error or find a change. Git, although incredibly powerful, can sometimes want to sail in a complex labyrinth. Beyond the familiar add
,, commit
And push
There is a set of orders that can considerably ration your workflow and reduce these “what has just happened?” moments.
This article explores 10 less used Git commands that can save you time and make your development process a little more fluid. Let’s take a look.
1 and 1 git bisect
(Find the source of a bug)
Imagine you have met a bug, but you don’t know when it was introduced. git bisect
Helps you determine the exact commitment that caused the problem by carrying out binary research in your validation history.
git bisect start
git bisect bad <bad-commit-hash>
git bisect good <good-commit-hash>
# Git will guide you through the process.
This is particularly useful for following regressions or bugs that appear after several modifications. Don’t forget to use git bisect reset
When you’re done.
2 git stash
(Saving temporarily)
If you have to change the branches quickly, but I don’t want to make incomplete work, git stash
is your friend. It temporarily records your modifications, allowing you to change branches and return to them later.
git stash
git checkout other-branch
# Do your urgent work
git checkout original-branch
git stash pop
It is a clean way to manage interruptions without cluttering your validation story.
3 and 3 git cherry-pick
(Apply specific commits)
Sometimes you need to apply a specific commitment to another branch without merge the entire branch. git cherry-pick
Allows you to do this exactly.
git cherry-pick <commit-hash>
It is useful for file fixes or selective incorporation of modifications.
4 git reflog
(Recovery of lost commits)
If you have accidentally removed a branch or changes pushed to force, git reflog
can help you recover these commits. He keeps a newspaper of all updates of the head of the branch.
git reflog
git checkout <commit-hash>
This can be a life buoy when you have to cancel the accidental changes.
5 git blame
(Tracking code changes)
git blame
shows you who has changed the last time each line of a file, as well as the hash and the date of validation.
git blame <file-name>
This can be useful for understanding the history of the code and identifying that has made specific changes.
6. git rebase -i
(Interactive rebasing)
git rebase -i
Allows you to clean your validation history by crushing, reformulating or abandoning validations.
git rebase -i HEAD~<number-of-commits>
Use it carefully, especially if you’ve already pushed your changes, because it rewrites history.
7 git clean
(Deletion of files not followed)
git clean
Delete files not followed by your work directory.
git clean -fd
This can help unclog your workspace. Be careful because it permanently deletes the files.
8 git submodule
(Manage external dependencies)
git submodule
Allows you to manage external dependencies as a separate standards in your main project.
git submodule add <repository-url> <path>
This is useful for projects with libraries or external components.
9. git describe
(Generate validation descriptions)
git describe
Grinds a description readable by man of a commitment, often using tags or validation atmosphere.
git describe
This can be useful for generating release notes or quickly identifying specific validations.
10 git worktree
(Work on several branches)
git worktree
Allows you to create several work directories for a single repository, allowing you to work simultaneously on several branches.
git worktree add <path> <branch-name>
This can improve productivity when you have to work on several features or fixes at the same time.