Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git "leaky" branches?

We usually do feature development on new branches and then bugfixes on the master branch. This time, for some reason, one of the feature branches had a leak where it was merged back into master when it shouldn't have.

From the screenshot, you can see that we have the feature branches sms_open and 121217. 121217 was supposed to be merged into master after our sprint and then the sms_open branch had a longer time estimate so it needed to be pushed back in a future release. I cannot figure out why sms_open commit 609129d was merged back in. I see the unwanted merge happening at 75e845b, but the developer who did this denies that sms_open was being merged back. Is there a way to verify this in any way?

FYI, the git tool used here is SourceTree for Mac OS.

source tree screenshot

like image 368
lamp_scaler Avatar asked Dec 24 '12 14:12

lamp_scaler


1 Answers

When you trace the greenish line down starting from 121217, you can see that it is connected to sms_open. This means that the history of 121217 is based on sms_open (it is one of its parent commits).

So whoever started the 121217 branch based it on sms_open instead of master (probably by mistake). This could be the author of commit e70759c.

When merging a branch in Git, all commits from the branch to merge that are not yet part of the branch that is being merged into will be part of the result. That's why the commits of sms_open were also merged.

like image 181
robinst Avatar answered Nov 25 '22 13:11

robinst