From: "armencho@gmail.com" <armencho@gmail.com>
To: git@vger.kernel.org
Subject: .git and retrieving full source tree for own project(s)
Date: Fri, 4 Sep 2009 21:52:07 +0200 [thread overview]
Message-ID: <981b72360909041252i29551a5chb8b3a2a5c6444ee3@mail.gmail.com> (raw)
Hi all,
I just started with git and suprisingly or unsurprisingly everything
works, and I love it. I had been working on a software project, and i
ran "git init" in its source tree, which created the ".git". I added
all files with "git add ." and first-time committed them all using
"git commit -a -m "Imported project files". I also did couple three
commits after that and well, everything works.
What I am wondering about is, what is gits identity for a repository?
I don't share or publish the source directory anywhere, and just for
testing I removed everything but the ".git" directory and tried "git
checkout" and "git checkout master". To my surprise, the files in
repository did NOT reappear, contrary to what I thought. Doesn't
checkout update/recreate the project file tree according to the
"trunk" snapshot?
Now, I did all this just out of curiosity, but to my understanding
everything that is needed for working with the project is stored in
".git", right? Even if all project files mysteriously disappear, "git
checkout" should bring the copy of master branch back, no? If not,
what is the way to tell git I want full copy of a snapshot?
next reply other threads:[~2009-09-04 19:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 19:52 armencho [this message]
2009-09-04 20:04 ` .git and retrieving full source tree for own project(s) Junio C Hamano
2009-09-04 20:18 ` armencho
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=981b72360909041252i29551a5chb8b3a2a5c6444ee3@mail.gmail.com \
--to=armencho@gmail.com \
--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).