Subject: Re: getting started, happy with cmd line on windows [Scanned]

From: Junio C Hamano <[email-masked]>
Date: Fri, 26 Dec 2008 15:50:15 -0800

"Zorba" <[email-masked]> 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.