Jump to content

confused with general idea of GIT and developing in live environment


ohdang888

Recommended Posts

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

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.