DEV Community

Discussion on: Merge vs rebase

Collapse
 
vishalraj82 profile image
Vishal Raj

@emyller Great article. As a general rule, I always fork & rebase my feature branch with the main. Once done, the feature branch is merged into main branch. Its been, so far so good with me.

Collapse
 
emyller profile image
Evandro Myller

Thanks! Rebasing might suffice in some cases, particularly in a rapid development flow when topic branches are short-lived, and the team appreciate a linear history more than a more verbose log. Otherwise, merging tends to be friendlier. 😉

Collapse
 
vishalraj82 profile image
Vishal Raj

Here's my strategy. Fork out the feature branch from master, say my-new-feature. Now every mate from my team branches from the my-new-feature branch for their part of work and keeps it merging back to my-feature-branch. Whille I keep rebasing the my-new-feature branch with master on daily basis. Once the feature is ready, the my-feature-branch is merged back to master.