git - What are the pitfalls of "always" rebasing? -


a few people @ work swear git pull --rebase. in fact, won't git pull without it, when several people working on shared branch.

it understanding rewrites history. in fact, have seen said 1 should never rebase on public/shared branch.

my question:

  • what concrete example of way rebasing "rewrites history"?
  • what concrete examples of bad things occur if violate "golden rule of rebasing"?

possible difference suggested dupe:

i'm not talking rebasing master feature branch. talking several developers working on same feature branch, doing git pull --rebase, making changes, pushing (doing pull --rebase if push rejected), etc.

we use in our workflows.

if use on short-lived branches it's relatively safe. you're replaying your local commits (rewriting that history) on top of pushed commits of coworkers.

if you're rebasing entire collaboration branch in best interests coordinate coworkers. otherwise it's easy lose work. pull -r, it's pretty hard.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -