0

Sorry for the title, I don't know how to describe this question, so I will put the facts.

Branch A is protected from merge from git. Only Bitbucket can do it.

  1. Someone modified our files in a project in branch A.
  2. We sent changes to branch B
  3. We intended to merge branch B into A and got conflict (via bitbucket).
  4. We checked these changes, and are incorrect, so branch B should be fully merged into A, replacing the changed files.

So, given that the merge must be done in Bitbucket, how do I instruct the tool to "accept mine", as Bitbucket does not have a merge tool.

Constraint: I can't merge A into B because A has more things than B that do not belong to our team.

JorgeeFG
  • 5,651
  • 12
  • 59
  • 92

1 Answers1

3

You can create a branch out from branch A (branch C) and then cherry-pick your changes from branch B. Finally, merge branch C into branch A.

gaheinrichs
  • 565
  • 5
  • 13
  • Seems legit, I hoped there was a cleaner approach but I can live with an unused branch (we can't remove them lol). So I will do branch C from A, switch to C, git checkout B file1 file2 file3, git commit, git push to server, then merge request C into A. Am I right? – JorgeeFG Jan 18 '18 at 19:35