lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.98.0704191325000.9964@woody.linux-foundation.org>
Date:	Thu, 19 Apr 2007 13:30:59 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jeff Garzik <jeff@...zik.org>
cc:	Avi Kivity <avi@...ranet.com>, linux-kernel@...r.kernel.org,
	kvm-devel@...ts.sourceforge.net
Subject: Re: [GIT PULL] kvm oops fix



On Thu, 19 Apr 2007, Jeff Garzik wrote:
> 
> What is the easiest way to completely undo a pull, reverting the branch to the
> HEAD present before the pull?

You can either do

	git reset --hard ORIG_HEAD

(git will set ORIG_HEAD before things like pulls or resets, so you can 
always go back), or, if you have reflogs enabled (and if you set up your 
repository with a modern git version it probably will be enabled by 
default), you can just do

	git reset --hard @{1}

where "@{1}" just means "HEAD ref state one change ago" (the same way you 
can say "@{2.hours.ago}" to mean HEAD state two hours ago).

In either case, double-check that that is indeed the version you want to 
revert to with

	git log ORIG_HEAD
 or
	git log @{1}

first, since obviously if you give "git reset --hard" the wrong version, 
it will reset to the wrong state. Although especially with reflogs, your 
previous state will always be logged, so you can always re-do what you 
undid by (again) doing "git reset --hard @{1}" to get back the previous 
state ;)

ALSO! Make sure that you don't have any dirty state in your working tree 
that you don't want to lose! "git reset --hard" will do what it implies: 
it will reset your tree. Very much including throwing away all your dirty 
state (and that you can't get back by going to a previous commit, since 
it was never committed!)

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ