Hi,
On 19 February 2011 21:01, Mark Rogers mark@quarella.co.uk wrote:
Hopefully a quick and easy question...
There's never such a thing ;)
I have some code developed for a website on a test (Linux) box, which I'll call TestServer. A colleague has a copy, mostly in sync (manually), on his
In sync with what?
I need to get the code onto a Linux box located in another office ("RemoteServer") in such a way as to allow me to make changes anywhere and manage the synchronisation, so I plan on setting up a git repository on my external server ("HostedServer"), and pull the site from (and push back changes to) it from RemoteServer.
Be prepared for strange and confusing conflict messages ;)
Of-course my starting point is that all of this has been done so far without any version control or other synchronisation. So, are there any pitfalls I should be aware of if I now try to get everything into git? Should I at
One pitfall is that you will not actually have any change history from previous versions, but I gather that you realised this already. Also be prepared for a learning curve.
least try to get everything synchronised in one location first? (I'd rather not, as I'd prefer to use git to manage that sync.)
Well, at one point, you will have to initialise a git repository. You'd need to do this at the start. (I'm not 100% sure, but it seems to me not possible to have two separately initialised git repositories that end up merged, though I do believe a commit can have two parents when merging. Thus it might be possible to fuse 2 unrelated trees together. Anyone that has an answer, please let me know! :-) )
Are there any issues I need to be aware of given that one person will be using a Windows box? (I'm assuming they'll use TortoiseGit; I'll probably set things up on my Windows laptop too.)
Git Extensions is a pretty good tool. Get it at: http://sourceforge.net/projects/gitextensions/ It is quite possible that at times they will still need to go to the command line.
Secondary issue: the sites make extensive use of a database. I should at least make attempts to ensure that the database schema is managed by git (but not the data in the database). Any suggestions as to how best to do this?
Just add the schema as a file in your git repository (and it should be fine if it's ASCII, though binary files are also handled OK).
Resources that could be useful:
-- http://book.git-scm.com/index.html
-- "Pro Git" by Scott Chacon (book, look on Amazon)
-- http://stackoverflow.com/questions/tagged/git
Regards, Srdjan