[Xcb] removing latest commit

Jamey Sharp jamey at minilop.net
Wed Feb 21 13:33:35 PST 2007

On Wed, Feb 21, 2007 at 09:18:29PM +0100, Vincent Torri wrote:
> My latest commit was wrong (my randr proto was not up to date)
> how do I use git rest to remove that commit ?

In general, the answer is "make sure it's right before you push." ;-)

As long as you coordinate with other people to make sure nobody's
changes get lost, though, you can

	git-reset --hard HEAD^ # remove the last commit locally
	git-push -f origin # make remote exactly match your local tree

Be careful! If anybody else has committed, this will erase their commits
too! And if anybody else has done a git-pull since you pushed the bad
commit, they'll have to `git-pull -f`, which can erase their local
commits. It's bad all the way around.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070221/f42808b4/attachment.pgp

More information about the Xcb mailing list