git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* three questions: proper forum? & reverting changes to the working directory
@ 2012-11-08 14:26 McKown, John
  2012-11-08 14:39 ` McKown, John
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: McKown, John @ 2012-11-08 14:26 UTC (permalink / raw)
  To: 'git@vger.kernel.org'

1) is this the proper forum for asking general git usage questions, such as "how to"? If not, what is?

2) I am unsure that I did things the "proper" way. I have a git maintained subdirectory. I made some changes and saved them in the working directory, but did not "git add" or "git commit" them. I then decided that I really messed up what I was doing (basically reformatting some source code). So to revert the changes back to what was last committed, I did a "git reset --hard HEAD". I think this is the proper way. But I picked up that command in the section of the documentation which was talking about abandoning a "git merge" attempt. What I did worked, but is it the proper way? If not, what is? 

3) More generically, suppose I have a file in my working directory that I want to put back the way it was "n" commits ago. The best that I can see, so far, is "git show HEAD~n:file >|file", replacing the "n" and "file" with appropriate values. 

-- 
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
john.mckown@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-08 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 14:26 three questions: proper forum? & reverting changes to the working directory McKown, John
2012-11-08 14:39 ` McKown, John
2012-11-08 14:51 ` Konstantin Khomoutov
2012-11-08 14:54 ` Andy Hawkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).