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.
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.