We have two branches in Git, master
and develop
. master
is being updated constantly by a partner group, and I am constantly rebasing our develop
branch onto master
, something like this:
#(on develop)
$ git pull --rebase origin master #1
$ git rebase origin/develop #2
$ git push origin develop #3
…but yesterday someone from the partner group committed onto master
without a proper e-mail address, so I encounter a problem by step #2
:
git rebase origin/develop
First, rewinding head to replay your work on top of it...
Applying: <...>
<...>
Patch does not have a valid e-mail address.
and git status
shows:
$ git status
# Not currently on any branch.
# You are currently rebasing.
# (all conflicts fixed: run "git rebase --continue")
#
nothing to commit, working directory clean
What I have done is skip the commits without address with git rebase --skip
, then cherry-pick these commits back after the rebase. But I wonder is this the proper way to do it? Can I cherry-pick the commit directly in-place, without skipping it? If yes, how do I actually find out this problematic commit (without looking it up in git log
), as it is basically the next commit that are to be rebased onto the top of the current commit, so git must somehow knows which one it is…?