0

We have a master branch and a diverged XXX branch. Some changes are made to Master branch. Some changes are made to XXX branch. Now, the requirement is that both should be up-to date with each other. Problems are: Multiple people works on the branch. My plan was cherry-pick the XXX branch changes and push it to Master and then rebase my XXX to Master. I tried cherry-picking the changes from XXX branch to Master and then tried pushing it but unfortunately it din't work ** [remote rejected] master -> refs/for/master (invalid author) Problem was, commit ids with other user email ids are not matching my email id.

Please suggest an approach.

aTJ
  • 3,823
  • 3
  • 21
  • 25

2 Answers2

2

Presumably you're using Gerrit as you're pushing to refs/for/master, and by default Gerrit checks that the email IDs of the pusher and committer match. See this Gerrit documentation for details.

You will need the "Forge Author" privilege in Gerrit to achieve this.

Adam H
  • 1,523
  • 11
  • 21
1

I think the most appropriate way to do this is to merge your XXX branch inside the master and then rebase XXX to master

Your two branches have the same ancestor, so the merge should run smoothly. Cherry-pick is only intended for single commit (or few), not managing branches changes.

GHugo
  • 2,584
  • 13
  • 14