Git Advanced Tips: 10 Advanced Commands That Will Impress Your Colleagues

An overhead view of a programmer's desk with dual monitors

image

Git is far more than just commit and push.

Master these 10 advanced commands and you’ll be the Git expert on your team.

  1. git rebase -i — Interactive rebase to tidy up your commit history and keep it linear:

After the editor opens:

  1. git cherry-pick — Cherry-pick commits to apply a specific commit from one branch onto your current branch:

  2. git worktree — Multiple working directories to work on several branches at the same time:

  3. git bisect — Binary search to pinpoint the commit that introduced a bug:

  4. git stash — Temporary storage

6. git reflog — Recover Lost Commits

7. git log — Beautified Output

8. git blame — Assign Blame

9. git diff — Advanced Usage

10. git submodule — Submodules