loading...

re: Rebase or merge VIEW POST

FULL DISCUSSION
 

It depends.

If you are the only person working on a branch and you haven't made a PR for it yet (and that nobody reviewed or commented on the said PR), you can and should rebase your work. It keeps git history clean and makes resolving a merge conflict easier. But you will need to force push your work (assuming you already pushed it) because it basically rewrites your commit history.

For every other scenario, you would use merge. So if you are sharing your branch with someone, merging will retain you and your collaborator's commit history.

And if you are really not sure about any of this, merging is the safest way to go about it.

 
code of conduct - report abuse