[TYPO3-core] Git: how to solve divergence?

Fabien Udriot fudriot at omic.ch
Mon May 16 11:27:52 CEST 2011


>>
>> There's at least one situation with Git where I'm still totally baffled
>> as to what I should do:
>>
>> I mistakenly applied a patch to a local branch tracking a remote branch,
>> using the cherry-pick command provided by Gerrit. Now I don't know how
>> to get rid of it.
>>
>> "git status" tells me the following:
>>
>> # On branch TYPO3_4-5
>> # Your branch and 'origin/TYPO3_4-5' have diverged,
>> # and have 1 and 11 different commit(s) each, respectively.
>> #
>> nothing to commit (working directory clean)
>>
>> How do I now drop the local change and find myself again on the remote
>> HEAD?
>>
>> Thanks in advance for any advice
>>
> Hi,
>
>
> I think that should work:
>
> use git rebase -i origin/master and just skip the offending commit.

Could this one do the job?

git reset --hard
git clean -f (to delete unwanted file that has been added with the cherry pick)



More information about the TYPO3-team-core mailing list