Who's using git? I've got questions
Posted: Thu Jun 21, 2012 11:31 am
Finally rebuilt my dev server at home and am forcing myself to use a vcs. I've settled on git, but am having trouble figuring out the best implementation and am looking for feedback. It is possible I am missing something fundamental, so all suggestions are welcome 
1) I understand that each "project" should have it's own repository. Since I develop on my desktop or laptop and commit to the server, the server should always have a reasonably current copy of my work. Lets say I reformat my desktop (windows machine) and now I want to pull down a copy of a few of the projects I am working on. How do I fetch a list of repositories on the server? Is this possible? Otherwise I have to know the name of the repositories explicitly, correct?
I am accessing with ssh - git@devbox:repo_name
2) What kind of a directory structure are you using? Hopefully this ascii art turns out, but is this similar to what you have set up or is there a better way?
[text]/raid_01
|
- mysql/*
- git/repositories/*
- www/html/
|
- git/* (exported by post-recieve hooks)
- * ad-hoc projects[/text]
When I commit to a git repo, I am using post-receive hooks to populate a directory in the wwwroot/git directory with a snapshot of the project, basically as would be uploaded to the client server. This keeps internal files (like .psd artwork files) seperate from external files
This allows me to browse project websites using something like
http://devbox/git/project_a
http://devbox/git/project_b
http://devbox/git/project_c
and still have the freedom to do ad-hoc coding anywhere outside of the git web directory.
http://devbox/ad-hoc/dev_network_challenges.php
http://devbox/test/array_functions.php
http://devbox/security/auth_test.php
etc...
1) I understand that each "project" should have it's own repository. Since I develop on my desktop or laptop and commit to the server, the server should always have a reasonably current copy of my work. Lets say I reformat my desktop (windows machine) and now I want to pull down a copy of a few of the projects I am working on. How do I fetch a list of repositories on the server? Is this possible? Otherwise I have to know the name of the repositories explicitly, correct?
I am accessing with ssh - git@devbox:repo_name
2) What kind of a directory structure are you using? Hopefully this ascii art turns out, but is this similar to what you have set up or is there a better way?
[text]/raid_01
|
- mysql/*
- git/repositories/*
- www/html/
|
- git/* (exported by post-recieve hooks)
- * ad-hoc projects[/text]
When I commit to a git repo, I am using post-receive hooks to populate a directory in the wwwroot/git directory with a snapshot of the project, basically as would be uploaded to the client server. This keeps internal files (like .psd artwork files) seperate from external files
This allows me to browse project websites using something like
http://devbox/git/project_a
http://devbox/git/project_b
http://devbox/git/project_c
and still have the freedom to do ad-hoc coding anywhere outside of the git web directory.
http://devbox/ad-hoc/dev_network_challenges.php
http://devbox/test/array_functions.php
http://devbox/security/auth_test.php
etc...