You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by Sebastian Schaffert <se...@gmail.com> on 2013/09/30 18:55:07 UTC

Accidently merged into "master"

Hi guys,

while working on MARMOTTA-324, I accidently merged back and pushed my
branch into master instead of develop. I'll try to revert this change as
soon as possible, sorry.

Greetings,

Sebastian

Re: Accidently merged into "master"

Posted by Jakob Frank <ja...@apache.org>.
With help from infra [1] I was able to revert the erroneous merge:

This is what I did:
git revert --no-commit --no-edit -s 4aa87db
git revert --no-commit --no-edit -s a9bf7e4 -m 1
git revert --no-commit --no-edit -s be31f8a
git revert --no-commit --no-edit -s 4b8b868
git revert --no-commit --no-edit -s c576351
git commit -s
git push origin master

Best,
Jakob

[1] http://s.apache.org/pRO

On 16 October 2013 10:02, Jakob Frank <ja...@apache.org> wrote:
> Easiest way would be to do a --hard reset of the master, but that's
> not allowed in the ASF Repo (at least for branch master)
> Also deleting the remote branch and re-pushing it is not allowed.
>
> So I filed an issue with Infra [1]
>
> Best,
> Jakob
>
> [1] https://issues.apache.org/jira/browse/INFRA-6876
>
> On 1 October 2013 02:13, Peter Ansell <an...@gmail.com> wrote:
>> That didn't reset to the right commit because there were commits since
>> cdb3223d that need to be kept ... I will look into it some more. Part
>> of the complexity seems to be that git can't easily revert merges and
>> other commits simultaneously so it may need two reverts (and then a
>> squash to make it look like a single revert before pushing)
>>
>> Peter
>>
>> On 1 October 2013 09:51, Peter Ansell <an...@gmail.com> wrote:
>>> Fixed.
>>>
>>> For reference, the command I used was the following, where the SHA1
>>> hash is the merge commit, and I needed to use -m 2 because it was a
>>> merge, and specifically "2" because of the direction the merge was
>>> done in (-m 1 would have retained the other tree of commits):
>>>
>>> git revert -m 2 a9bf7e4fa56f00e26e09a5fae002686eb65631df
>>>
>>> You can see the comparison at the following URL on GitHub, which for
>>> me is completely empty, as desired.
>>>
>>> https://github.com/ansell/incubator-marmotta/compare/apache:cdb3223db7439a9f8fd7fb5159ffd52f6da0ecb7...4aa87dbe5c121476176292416e36e71f613be83e?expand=1#files_bucket
>>>
>>> Cheers,
>>>
>>> Peter
>>>
>>> On 1 October 2013 07:55, Peter Ansell <an...@gmail.com> wrote:
>>>> I think you need to push a revert commit for the master branch.
>>>>
>>>> --
>>>> Peter
>>>>
>>>> On 01/10/2013, at 3:31 AM, Sebastian Schaffert <se...@gmail.com> wrote:
>>>>
>>>>> Sorry, I don't manage (Apache does not allow forcing reverting a version).
>>>>> Maybe someone who already did this can help me tomorrow ...
>>>>>
>>>>> Greetings,
>>>>>
>>>>> Sebastian
>>>>>
>>>>>
>>>>> 2013/9/30 Sebastian Schaffert <se...@gmail.com>
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> while working on MARMOTTA-324, I accidently merged back and pushed my
>>>>>> branch into master instead of develop. I'll try to revert this change as
>>>>>> soon as possible, sorry.
>>>>>>
>>>>>> Greetings,
>>>>>>
>>>>>> Sebastian
>>>>>>

Re: Accidently merged into "master"

Posted by Jakob Frank <ja...@apache.org>.
Easiest way would be to do a --hard reset of the master, but that's
not allowed in the ASF Repo (at least for branch master)
Also deleting the remote branch and re-pushing it is not allowed.

So I filed an issue with Infra [1]

Best,
Jakob

[1] https://issues.apache.org/jira/browse/INFRA-6876

On 1 October 2013 02:13, Peter Ansell <an...@gmail.com> wrote:
> That didn't reset to the right commit because there were commits since
> cdb3223d that need to be kept ... I will look into it some more. Part
> of the complexity seems to be that git can't easily revert merges and
> other commits simultaneously so it may need two reverts (and then a
> squash to make it look like a single revert before pushing)
>
> Peter
>
> On 1 October 2013 09:51, Peter Ansell <an...@gmail.com> wrote:
>> Fixed.
>>
>> For reference, the command I used was the following, where the SHA1
>> hash is the merge commit, and I needed to use -m 2 because it was a
>> merge, and specifically "2" because of the direction the merge was
>> done in (-m 1 would have retained the other tree of commits):
>>
>> git revert -m 2 a9bf7e4fa56f00e26e09a5fae002686eb65631df
>>
>> You can see the comparison at the following URL on GitHub, which for
>> me is completely empty, as desired.
>>
>> https://github.com/ansell/incubator-marmotta/compare/apache:cdb3223db7439a9f8fd7fb5159ffd52f6da0ecb7...4aa87dbe5c121476176292416e36e71f613be83e?expand=1#files_bucket
>>
>> Cheers,
>>
>> Peter
>>
>> On 1 October 2013 07:55, Peter Ansell <an...@gmail.com> wrote:
>>> I think you need to push a revert commit for the master branch.
>>>
>>> --
>>> Peter
>>>
>>> On 01/10/2013, at 3:31 AM, Sebastian Schaffert <se...@gmail.com> wrote:
>>>
>>>> Sorry, I don't manage (Apache does not allow forcing reverting a version).
>>>> Maybe someone who already did this can help me tomorrow ...
>>>>
>>>> Greetings,
>>>>
>>>> Sebastian
>>>>
>>>>
>>>> 2013/9/30 Sebastian Schaffert <se...@gmail.com>
>>>>
>>>>> Hi guys,
>>>>>
>>>>> while working on MARMOTTA-324, I accidently merged back and pushed my
>>>>> branch into master instead of develop. I'll try to revert this change as
>>>>> soon as possible, sorry.
>>>>>
>>>>> Greetings,
>>>>>
>>>>> Sebastian
>>>>>

Re: Accidently merged into "master"

Posted by Peter Ansell <an...@gmail.com>.
That didn't reset to the right commit because there were commits since
cdb3223d that need to be kept ... I will look into it some more. Part
of the complexity seems to be that git can't easily revert merges and
other commits simultaneously so it may need two reverts (and then a
squash to make it look like a single revert before pushing)

Peter

On 1 October 2013 09:51, Peter Ansell <an...@gmail.com> wrote:
> Fixed.
>
> For reference, the command I used was the following, where the SHA1
> hash is the merge commit, and I needed to use -m 2 because it was a
> merge, and specifically "2" because of the direction the merge was
> done in (-m 1 would have retained the other tree of commits):
>
> git revert -m 2 a9bf7e4fa56f00e26e09a5fae002686eb65631df
>
> You can see the comparison at the following URL on GitHub, which for
> me is completely empty, as desired.
>
> https://github.com/ansell/incubator-marmotta/compare/apache:cdb3223db7439a9f8fd7fb5159ffd52f6da0ecb7...4aa87dbe5c121476176292416e36e71f613be83e?expand=1#files_bucket
>
> Cheers,
>
> Peter
>
> On 1 October 2013 07:55, Peter Ansell <an...@gmail.com> wrote:
>> I think you need to push a revert commit for the master branch.
>>
>> --
>> Peter
>>
>> On 01/10/2013, at 3:31 AM, Sebastian Schaffert <se...@gmail.com> wrote:
>>
>>> Sorry, I don't manage (Apache does not allow forcing reverting a version).
>>> Maybe someone who already did this can help me tomorrow ...
>>>
>>> Greetings,
>>>
>>> Sebastian
>>>
>>>
>>> 2013/9/30 Sebastian Schaffert <se...@gmail.com>
>>>
>>>> Hi guys,
>>>>
>>>> while working on MARMOTTA-324, I accidently merged back and pushed my
>>>> branch into master instead of develop. I'll try to revert this change as
>>>> soon as possible, sorry.
>>>>
>>>> Greetings,
>>>>
>>>> Sebastian
>>>>

Re: Accidently merged into "master"

Posted by Peter Ansell <an...@gmail.com>.
Fixed.

For reference, the command I used was the following, where the SHA1
hash is the merge commit, and I needed to use -m 2 because it was a
merge, and specifically "2" because of the direction the merge was
done in (-m 1 would have retained the other tree of commits):

git revert -m 2 a9bf7e4fa56f00e26e09a5fae002686eb65631df

You can see the comparison at the following URL on GitHub, which for
me is completely empty, as desired.

https://github.com/ansell/incubator-marmotta/compare/apache:cdb3223db7439a9f8fd7fb5159ffd52f6da0ecb7...4aa87dbe5c121476176292416e36e71f613be83e?expand=1#files_bucket

Cheers,

Peter

On 1 October 2013 07:55, Peter Ansell <an...@gmail.com> wrote:
> I think you need to push a revert commit for the master branch.
>
> --
> Peter
>
> On 01/10/2013, at 3:31 AM, Sebastian Schaffert <se...@gmail.com> wrote:
>
>> Sorry, I don't manage (Apache does not allow forcing reverting a version).
>> Maybe someone who already did this can help me tomorrow ...
>>
>> Greetings,
>>
>> Sebastian
>>
>>
>> 2013/9/30 Sebastian Schaffert <se...@gmail.com>
>>
>>> Hi guys,
>>>
>>> while working on MARMOTTA-324, I accidently merged back and pushed my
>>> branch into master instead of develop. I'll try to revert this change as
>>> soon as possible, sorry.
>>>
>>> Greetings,
>>>
>>> Sebastian
>>>

Re: Accidently merged into "master"

Posted by Peter Ansell <an...@gmail.com>.
I think you need to push a revert commit for the master branch.

--
Peter

On 01/10/2013, at 3:31 AM, Sebastian Schaffert <se...@gmail.com> wrote:

> Sorry, I don't manage (Apache does not allow forcing reverting a version).
> Maybe someone who already did this can help me tomorrow ...
> 
> Greetings,
> 
> Sebastian
> 
> 
> 2013/9/30 Sebastian Schaffert <se...@gmail.com>
> 
>> Hi guys,
>> 
>> while working on MARMOTTA-324, I accidently merged back and pushed my
>> branch into master instead of develop. I'll try to revert this change as
>> soon as possible, sorry.
>> 
>> Greetings,
>> 
>> Sebastian
>> 

Re: Accidently merged into "master"

Posted by Sebastian Schaffert <se...@gmail.com>.
Sorry, I don't manage (Apache does not allow forcing reverting a version).
Maybe someone who already did this can help me tomorrow ...

Greetings,

Sebastian


2013/9/30 Sebastian Schaffert <se...@gmail.com>

> Hi guys,
>
> while working on MARMOTTA-324, I accidently merged back and pushed my
> branch into master instead of develop. I'll try to revert this change as
> soon as possible, sorry.
>
> Greetings,
>
> Sebastian
>