git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Hawkins <andy@gently.org.uk>
To: git@vger.kernel.org
Subject: Re: three questions: proper forum? & reverting changes to the working directory
Date: Thu, 8 Nov 2012 14:54:30 +0000 (UTC)	[thread overview]
Message-ID: <slrnk9nht6.rce.andy@atom.gently.org.uk> (raw)
In-Reply-To: A6B9336CDB62BB46B9F8708E686A7EA0115BAA1404@NRHMMS8P02.uicnrh.dom

Hi,

In article <A6B9336CDB62BB46B9F8708E686A7EA0115BAA1404@NRHMMS8P02.uicnrh.dom>,
           McKown, John<John.McKown@healthmarkets.com> wrote:

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

I'd say that here is fine. #git on freenode is also a good source of advice.

> 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?

The easiest answer to this is run 'git status'. It'll list the files in
various states, and tell you how to undo the changes.

Andy

      parent reply	other threads:[~2012-11-08 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnk9nht6.rce.andy@atom.gently.org.uk \
    --to=andy@gently.org.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).