Reputation: 57
I am a Git newbie and have a question about how I should set it up within the restraints of our environment, and hoping someone can help me out and let me know if my thinking is correct.
Our IT department would prefer not to have Git installed on our Staging Server, so we're thinking we'll have to use a network drive. The plan is this:
Does this seem like a good plan and is this an okay way to use Git?
Thanks!
Upvotes: 3
Views: 314
Reputation: 40619
This is definitely a good way to use git. I would very much recommend it. Using revision control at all is a very crucial key to staying sane while developing good code, and that's how it made its way onto the Joel Test. If the developers can control everything about their development cycle, that is also advantageous because that way there is no bottle neck in development. Also, IT being able to keep autonomy over there own systems sounds like a good idea as well. So it can be a win-win situation.
I would tag (with some arbitrary revision-number system) every single revision which you copy over to the staging environment -- or maybe not literally every revision you copy over, but there is no harm in over-tagging, and it would be very unfortunate if you under-tagged and cannot revert back to some other revision afterwards.
For copying files over to the staging server, I would look into a tool like rsync. That will make copying changes much more immediate than having to restart a whole copy. On the network drive, git checkout
the exact revision you will want to copy over to staging, then do whatever testing you do on your end, and then tell rsync to sync the two computers (you will have to figure out rsync if you use it). So, yes, you will copy the files directly from the network server.
Also, consider the idea of having some file itself which marks the revision number (including the git SHA-1 hash) so that when the files get copied over to the staging server, you will know exactly which version is there.
Finally, here is another link to more information about git branching which may or may not help you out: a successful git branching model
--
post any comments below if you have any comments/questions.
Upvotes: 1