ArrowLeft Icon

Git Beyond Basics: 7 Uncommon Git Commands Every Developer Should Know

πŸ“† Β· ⏳ 3 min read Β· Β· πŸ‘€


Git is a powerful tool for version control that allows developers to track changes to their code over time. However, the vast number of Git commands available can be overwhelming, and most developers only use a fraction of them.

In this article, we will explore seven uncommon Git commands that can help you to work more efficiently and effectively.


git stash

The git stash command allows you to temporarily save changes that are not yet ready to be committed.

This can be useful when you need to switch branches or pull in changes from another branch without committing your changes.


Terminal window
git stash
Saved working directory and index state WIP on feature-branch: 7f23a8a Add new feature

git bisect

The git bisect command helps you to find the commit that introduced a bug in your code.

You can use this command to quickly locate the commit that caused the bug and fix it.


Terminal window
git bisect start
git bisect bad
git bisect good v1.0

git rebase

Git rebase is a command that allows you to rewrite your Git history.

This can be useful if you need to clean up your commit history before merging a branch or if you need to apply a series of commits from one branch to another.


Terminal window
git checkout feature-branch
git rebase main

git revert

If you ever need to undo a commit, git revert is the command to use. Unlike git reset, git revert allows you to undo a commit without removing it from your Git history

This is useful if you need to undo a commit that has already been pushed to a remote repository.


Terminal window
git revert 7f23a8a

git cherry-pick

The git cherry-pick command allows you to apply a single commit from one branch to another.

This can be useful when you need to apply a specific fix or feature to another branch without merging the entire branch.


Terminal window
git cherry-pick 7f23a8a

git blame

The git blame command allows you to see who last modified a specific line of code and when.

This can be helpful in identifying the author of a particular bug or issue.


Terminal window
git blame index.html

git submodule

The git submodule command allows you to include one Git repository as a subdirectory of another Git repository.

This can be useful when you need to include a shared library or tool in your project.


Terminal window
git submodule add


In this article, we have explored seven uncommon Git commands that can help improve your workflow and productivity. These commands can help you to work more efficiently, troubleshoot issues, and collaborate more effectively with your team.

By incorporating these commands into your daily workflow, you can become a more proficient Git user and take your coding skills to the next level.

EnvelopeOpen IconStay up to date

Get notified when I publish something new, and unsubscribe at any time.

Need help with your software project? Let’s talk

You may also like

  • # git# engineering

    5 Basic Git Commands Every Developer Must Know

    Learn the top 5 basic git commands with examples that you must know as a developer in 2020.

  • # projects# engineering

    I built my own in-house Newsletter system

    Discover how I transformed the need for a newsletter system, sparked by Revue's shutdown, into a fulfilling side project. Dive into the my journey of conceptualizing, breaking down, and building a custom newsletter system that seamlessly integrates with my website's content workflows.

  • # engineering

    Incremental Static Regeneration: Dynamic Websites with SSR and Cache Headers

    Step into the world of web development magic as we unravel the fascinating tale of Incremental Static Regeneration (ISR). Join me on this journey where we'll explore how to leverage Server-Side Rendering (SSR) with smart cache headers to build dynamic websites that load with lightning speed. Buckle up – we're about to give your website a turbo boost!