-1

At my office we are using git and doing some code review. Coming the time to review my colleague ask me to merge the source branch (master) into my feature branch to be able to see the differences and do the review. I did not really agree because in my mind the feature branch was supposed to contain only the commits of the feature and so not import the master branch changes.

So I would like to know if when creating a long living shared feature branch, shall I merge at any point the source branch into the feature branch or not?

I have seen some explanations when git rerere is enabled where you merge the source branch into the feature one to record the resolution of the potential conflicts then revert the commit's merge.

I would like to know what is the best practice.

La Chamelle
  • 2,797
  • 3
  • 33
  • 54

1 Answers1

0

It depends how you're doing the reviews. We use pull requests in Atlassian Stash and it will give you a clean diff. This is highly dependent on your workflow.

At the end of the day, you can always do a diff between two commits.

Joe Phillips
  • 44,686
  • 25
  • 93
  • 148