DEV Community

Discussion on: On the usefulness of `git rebase`

Collapse
 
cmiles74 profile image
Christopher Miles

I use git rebase when my team is committing to the same branch (as opposed to a branch per feature) and I'm getting ready to push my local commits to my team's remote branch. When there are no conflicts this avoids a commit like "merged with upstream" and when there are conflicts, the commit that resolves them is right next to my other commits around the same feature.

 git pull --rebase origin main
Enter fullscreen mode Exit fullscreen mode

There are a lot of articles that try to explain how it works, this one seems pretty good.