Do I have to merge the wizard into a branch function to update it? Would this be considered bad practice?

I have this situation:

(master) A - B - E - F \ C - D (feature-x) 

Should I merge master in feature-x if I need critical fixes E and F in the feature-x branch to continue development, and I intend to merge back into master?

Is there a drawback of merging the master again into function branches, and then the function returns to the master when the function branch may or may not be passed to other developers?

+6
source share
2 answers

As far as I understand, merging a wizard into your function branch is not considered bad practice. @Larsks answer gives some good info on how to use rebasing, which is an option. But be sure to follow the golden rule "Do not interrupt commits that exist outside of your repository" (see "Dangers of reloading") .

To clarify: “commits that exist outside of your repository” will be public (pushed) commits.

If you are wondering whether reinstalling is better than merging or vice versa, I would suggest you look at: 'Rebase vs. Merge ' . The article states that the answer to this question depends on what you and your team consider the best for your project.

For large projects, I like the story to show exactly what happened. Therefore, when I work, we usually combine wizards in our function branches to update them with the latest code. Although, I would not consider this global best practice for everyone. However, this is not considered bad practice.

Some others like to have a very clean history, so reinstalling them can be considered the best option.

+6
source

The most common workflow to handle this situation is probably to rebase your function branch on the main branch:

 $ git checkout feature-x $ git rebase master 

This gives you:

  (master) A - B - E - F \ C - D (feature-x) 
+5
source

All Articles