DEV Community

Discussion on: Git Rebase vs Merge

Collapse
 
victoryarema profile image
Victor Yarema

The trick is that the statement "don't use rebase on shared branches" is just wrong.

Collapse
 
juristr profile image
Juri Strumpflohner

What do you mean by "is just wrong"? You suggest using rebase also on shared branches? Can you elaborate?

Collapse
 
gayanhewa profile image
Gayan Hewa

+1 IMO, the working branch should be rebased against the upstream. But shared branches ie. Master / or anything else similar should have merge commits.

Thread Thread
 
juristr profile image
Juri Strumpflohner

Can you elaborate on that? If I got you right, you basically say that the feature branches should be rebased to be updated with master, but when you merge it back it, you want to use a merge commit, so use "git merge". Is that what you intended?