Git rebase: find the "next" commit to reinstall?

We have two branches in Git, master and develop . master constantly updated by a group of partners, and I constantly switch the develop branch to 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 on master did not provide a proper email address, so I ran into a problem in 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 did was skip commits without an address using git rebase --skip , and then cherry-pick them after recovery. But I think this is the right way to do this? Can I make a cherry grab on the spot without missing it? If so, how do I really recognize this problematic commit (without looking into git log ), since this is basically the next commit that needs to be reinstalled at the top of the current commit, so git must somehow know which one ... ?

+4
source share
1 answer

You can try all the suggestions in Change the name of the author and committer and e-mail of several commits in Git

or you can add -i there to continue working (useful if you have a constant problem with automatic installation or just want to continue working and let someone else fix their problem in the end)

So when i get

 > git rebase master First, rewinding head to replay your work on top of it... Patch does not have a valid e-mail address. 

I do git rebase --abort and then

 > git rebase master -i Successfully rebased and updated refs/heads/mybranch. 

This is true for git 2.1.4.

Obviously, it contains a list of reinstallations for editing, but you just save the unedited data and continue on your way.

And yes, he does it with the help of the "original author <>"

+2
source

All Articles