.git and retrieving full source tree for own project(s)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]