git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Zorba" <cr@altmore.co.uk>
Cc: git@vger.kernel.org
Subject: Re: getting started, happy with cmd line on windows [Scanned]
Date: Fri, 26 Dec 2008 15:50:15 -0800	[thread overview]
Message-ID: <7v4p0qlcnc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <gj3of4$pr3$3@ger.gmane.org> (cr@altmore.co.uk's message of "Fri, 26 Dec 2008 23:13:20 -0000")

"Zorba" <cr@altmore.co.uk> writes:

> Now, I went back and read the manual pages for git-checkout and think I see 
> how to do it....
>
> $ <import code>
> $ git init
> $ git commit
> $ git tag versionA <commitID>
> $ hack hack hack
> ...
> now ready to start coding, want "last known good"
> $ rm *.*
> $ git checkout versionA .
>
> This worked fine when versionA had only files and no dirs - but will it work 
> ok still if versionA is a proper tree ?
> (more of a unix question I suppose - will "." suffice as the path ?) 

Drop "rm *.*".  Instead, probably what you want is

> $ <import code>
> $ git init
> $ git commit

which is a good way to make an initial import.

> $ git tag versionA <commitID>
> $ hack hack hack
> ...

and you futzed with the codebase without any intention of committing;
it is nice to be able to experiment freely.

After you are done experimenting,

$ git reset --hard versionA

if you did not make any commit, or even if you did commit while you were
experimenting, if you do not want these experimental commits at all.

No need for "rm *.*" anywhere.

  reply	other threads:[~2008-12-26 23:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 13:52 getting started, happy with cmd line on windows [Scanned] Conor Rafferty
2008-12-26 16:39 ` René Scharfe
2008-12-26 23:13   ` Zorba
2008-12-26 23:50     ` Junio C Hamano [this message]
2008-12-27  2:18       ` Zorba
2008-12-28 18:39 ` Daniel Barkalow
2008-12-30  1:22   ` Zorba

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=7v4p0qlcnc.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=cr@altmore.co.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).