ohdang888 Posted May 8, 2011 Share Posted May 8, 2011 Hey, I'm just confused with the general idea of GIT. I know it keeps a log of changes, etc, but how do you test your websites? Bascially my problem is this: I have a number of users on my site, and i don't want to actively develop on the LIVE site. So for the past few weeks, I've been developing on a beta.mysite.com address, and using rsync to transfer the changes. But I'm growing too fast for that. Sometimes i want to commit 1 or 2 files, but not the other 10 I've created as new features, etc. In RYSNC, this is a little tedious, and i'm hoping GIT will help... But if develop in GIT on my mac, I'll need to test it out on Beta. and then would i have to use RSYNC again to bring it to the live site. I guess what i'm asking is this: Do you all (who use GIT), test your websites on a server hosted on your personal computer, and then push it from the live site to there? Or how do you go about this? Thanks Quote Link to comment Share on other sites More sharing options...
Adam Posted May 9, 2011 Share Posted May 9, 2011 You need to read up on branches. They allow you to fork development and merge back in later, so that you can control what exactly goes into your live branch but still work on several developments at once. It's a good idea to regularly 'rebase' your more lengthy development branches onto the latest live, so that you're always working on an up-to-date version of the code base. When you do merge in development branches you should merge them in under a parent commit, so that you have a cleaner and more identifiable commit history. You'd be best building up a next/experimental branch as well, so that you can test what you're about to merge into your live branch before you actually do it. Have you considered writing a Git alias to handle rolling the files out? Or.. why not just checkout the live branch on your production server? Quote Link to comment Share on other sites More sharing options...
Adam Posted May 9, 2011 Share Posted May 9, 2011 I guess what i'm asking is this: Do you all (who use GIT), test your websites on a server hosted on your personal computer, and then push it from the live site to there? Or how do you go about this? In answer to this; yes. You should always aim to perform development on a local web server. When all development is complete (and code reviewed, tested locally - depending on what your procedures are) you should then push to your UAT server, for testing on an identical - or close to - set-up as your production server. Once you're confident, you should then push to your production server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.