Re: getting started, happy with cmd line on windows [Scanned]
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 26, 2008, 23:50 UTC
- Message-ID
- <7v4p0qlcnc.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <gj3of4$pr3$3@ger.gmane.org>
"Zorba" <cr@altmore.co.uk> writes:
Show 16 quoted lines
> 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.