Unknown Git Commands

Siva Krishna Reddy Pulicherla
2 min readMar 22, 2023

--

Hey developers,

we all know how Git is an essential tool in our everyday workflow. However, there are some rarely used but useful Git commands that can make our lives easier without leaving your terminal for quick actions.

Here are some Git commands that you might not have heard of or used before:

⭐ 1. git cherry-pick: This command allows you to apply a specific commit from one branch to another. It’s especially useful when you want to move a bug fix or a feature from a feature branch to a release branch.

⭐ 2. git rebase: This command allows you to reapply a set of commits on top of another branch. It’s useful when you want to incorporate changes from one branch into another branch while maintaining a clean commit history.

⭐ 3. git worktree: This command lets you have multiple working trees on the same branch, so you can work on different features or bugs simultaneously. It’s especially useful for larger projects with complex codebases.

⭐ 4. git reflog: This command shows you a log of all the Git actions that have been performed on your repository, including commits, branch merges, and rebases. It’s useful when you need to recover lost commits or undo changes.

⭐ 5. git log — oneline — decorate — graph — all: This command shows you a graphical representation of the Git commit history, including branches, merges, and commits. It’s useful when you need to visualize the development history of your codebase.

⭐ 6. git grep: This command allows you to search for a specific string or pattern in your codebase. It’s useful when you need to find a specific line of code or function, but you’re not sure which file it’s in.

--

--

No responses yet