On Fri, Jul 13, 2012 at 5:38 AM, Angelo Borsotti <[email protected]> wrote: > Hi, > > I guess that a tarball would be the distro of the project, i.e. what is > deployed, > while a released project should contain the .git repo, with all the history > in it > so as to let future developers have all the data to start a new development. > In such a case what is not needed are the files since they are also > contained > in the .git repo. I was wandering why there should instead be a need to have > also the files (note that a directory with a .git in it and no other files > is a > project with a pending change in it that is the removal of all files, as > reported > by git status).
Ah, you're talking about a "bare" repository, with no working directory. That's actually the most common way to set up a repository that's meant to be distribution point. In fact, if the repository is *not* bare, then by default you won't be able to push to the branch that's checked out. To create a bare repo, use 'git init --bare' or 'git clone --bare <other-repo>'. To make an existing repo bare, use 'git config --bool core.bare true', move the .git directory and give it a better name (i.e., 'mv .git ../my-project.git'), then you can delete the old working directory. (Credit to http://stackoverflow.com/questions/2199897/git-convert-normal-to-bare-repository for part of this answer.) -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
