On Tue, 2012-07-24 at 20:34 -0400, Sean Coates wrote: > > Use > > git reset --hard origin/PHP-5.4 > > to reset your local checkout to the current version on the server. > > It should be noted that when you `reset --hard`, you'll lose local > changes (including branch commits, except in the reflog). You'll > probably want to stash first, reset, then stash pop (or branch > locally, merge, checkout 5.4, reset, then cherry-pick (or maybe > merge)). > > Sorry for the noise if this is already widely known, but since PHP is > relatively new to the world of git, I thought it was worth mentioning.
Thanks for the advise! I hope nobody was affected as we had the issue for less than an hour. For reference: The 5.4 with the invalid commit is backed up at https://github.com/johannes/php-src/commits/php-5.4-messup2 The bad commit was 8ad868 there, looks innocent but is quite a big merge. I wonder if anybody can suggest a way to detect such commits automatically so we can catch them. `git diff` and others show nothing of relevance. To undo the commit I took the following steps: $ git checkout PHP-5.4 # Get a clean tree including the bad # commit $ git reset --hard 5f224412fa689 # This is the last good commit # before 8ad868 $ git push -f origin PHP-5.4 # Overwrite newer versions on the # server. Right now only I can do that # (see my recent commit to karma.git) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php