[jboss-as7-dev] Don't pull from master!

Heiko Braun hbraun at redhat.com
Thu May 26 10:36:15 EDT 2011



thanks for the explanation.

On May 26, 2011, at 4:34 PM, Benjamin Browning wrote:

> Sure - what happens when you reset --hard and push -f is you effectively erase history on the master branch. So, any person or thing (CI, Fisheye) that pulled the commit before you pushed the reset now has a commit in their local workspace that no longer exists upstream. Because AS7 is a prominent open-source project, it's very likely that people and systems have checked out your sources that don't subscribe to this list and thus haven't seen the warning to correct things.
> 
> In this case the effects are hopefully minimal but it's still good practice to never erase history from a shared repo. Instead, use something like 'git revert' to push a new commit undoing the changes of the bad merge.
> 
> Ben
> 
> On May 26, 2011, at 10:18 AM, Heiko Braun wrote:
> 
>> 
>> 
>> Can you elaborate on this?
>> 
>> 
>> On May 26, 2011, at 4:14 PM, Benjamin Browning wrote:
>> 
>>> You should never, ever do this on a shared git repo :(
>>> 
>>> On May 26, 2011, at 10:12 AM, Kabir Khan wrote:
>>> 
>>>> Hi,
>>>> 
>>>> That is what we ended up doing, I just wanted to check with the others and make double sure I did not break anything again. 
>>>> 
>>>> For anybody who got the bad commit 
>>>> 43d53e805ca8fbdd83fda496d0119ab32ad2a711 Merge branch 'master' of https://github.com/jbossas/jboss-as 
>>>> 
>>>> you MUST do a 
>>>> git pull --rebase upstream master
>>>> 
>>>> or if you don't have any local changes:
>>>> git fetch upstream; git reset --hard upstream/master
>>>> 
>>>> On 26 May 2011, at 14:52, Thomas Diesler wrote:
>>>> 
>>>>> The quickest would be
>>>>> 
>>>>>> git checkout master
>>>>>> git reset --hard <last-good-commit>
>>>>>> git push origin -f master
>>>>> 
>>>>> cheers
>>>>> -thomas
>>>>> 
>>>>> On 05/26/2011 03:13 PM, Kabir Khan wrote:
>>>>>> Master is in an inconsistent state due to me accidentally having pulled in a merge commit, and I'm looking at how to restore it. If you rebase onto master now we will end up in a mess again.
>>>>>> _______________________________________________
>>>>>> jboss-as7-dev mailing list
>>>>>> jboss-as7-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>> 
>>>>> -- 
>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>>> Thomas Diesler
>>>>> JBoss OSGi Lead
>>>>> JBoss, a division of Red Hat
>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>>> 
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>> 
>>>> 
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> jboss-as7-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>> 
>>> 
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> 
> 
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev




More information about the jboss-as7-dev mailing list