bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-fastforward push: action required... maybe


From: Paolo Bonzini
Subject: Re: non-fastforward push: action required... maybe
Date: Tue, 21 Sep 2010 10:18:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

    * first, commit any changes you may have

    * if you're on the "master" branch, save its state on a branch, just in 
case:

         git checkout -b $(date +%j)-snapshot

    * get back on master:

         git checkout master

    * "unlink" from master all changes prior to the above commit:

         git reset --hard 53398ec2976b5e2813c26146a11e8966e6a8120d^

    * now pull, fetch or whatever you do to get the latest:

         git pull

git pull --rebase may be enough if you were just tracking grep.git and have no qualms with rewriting history yourself (e.g. because your branch isn't public). If something goes wrong, you can always "git rebase --abort" and follow Jim's safer procedure.

FWIW, an alternative way to fix the conflict could have been this:

   git checkout master
   git merge origin/master      # merge with 53398e
   git checkout address@hidden      # back to NEWS-modifying commit
   ... proceed with release process ...

thus creating a merge commit (also discouraged but not so strictly) but not rewriting history. No big deal though.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]