From: Johannes Sixt Date: Thu, 10 Jan 2008 14:12:50 GMT Subject: Re: Revert git push Message-ID: <478627E2.4060808@viscovery.net> In-Reply-To: <6zve61q0t3.fsf@odpc25.int.ondemand.co.at> Markus Korber schrieb: > Hi, > > I've got two local git repositories, linux and mplayer, where I push to > from a local directory. Now I accidentally pushed from mplayer into the > linux repository (via a not updated URL[1]). Is it somehow possible to > revert this push if nobody has pushed something since my last pull from > the linux repository? Sure. $ cd /the/linux/repo $ git checkout 94545baded $ git branch -f master 94545baded $ git checkout master Omit the two checkouts if the repo is bare or if it did not have 'master' checked out. -- Hannes