Skip to content

Would you rather Rebase or Merge? #21558

Answered by stefanbc
nxsyed asked this question in New to GitHub
Discussion options

You must be logged in to vote

I’ve always used this as a rule of thumb, if you are working with others on the same branch, never rebase. Otherwise you can go ahead and rebase to your hearts content.

Rebase moves all of the commits from let’s say master to the tip of your feature branch. Keep in mind that this only happenes in_ _repository. All of the other developers, you’re working with, are still working with the original master. Rebasing results in brand new commits, and Git will think that your branch’s history has diverged from everybody else’s.

So to answer your question: it depends on the case.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants