3

I am developing a website which so far has been pretty simple, and my methodology is probably not considered professional but I have not had any problems doing it this way:

  1. write script on home PC
  2. FTP to the server location
  3. load website in browser and check if page works as I hoped.
  4. repeat

Now, somebody else is going to help me, so I want to add some version control, as the "easy" part of the website is done and we will be doing more interesting stuff. For better or worse I've chosen Git as the DVCS. I have git already on the server, bt am not sure where to init a git repository on the server.

What I mean is, should I initialize the git repository at the base directory of my website? If so, assuming various open exist, will this be a problem?

I've used git with other projects, but not for websites, except doing some tutorials with RedHat Openshift.

2 Answers2

2

Here's a possible workflow:

  1. Initialize a Git repository on your computer in the base folder
  2. Create a develop branch. This is where all the development will happen
  3. Have your collaborators clone your repository
  4. Anytime you commit, do it on develop branch. Anytime your collaborators commit, have them commit on their develop and then push to you
  5. Once you're ready to deploy to actual web server, switch to master branch and merge develop into it
  6. rsync/ftp to the server
enthrops
  • 729
  • 5
  • 14
-1

It would be much easier to use a git hosting service such as github or gitorious. Repository administration is not an easy task, especially for a novice git user.

Once you have a repository set up, cloning it is the same on all machines (development machines and server).

The tricky part is deciding how to deploy to server, but that a completely different topic.

Yuval Adam
  • 161,610
  • 92
  • 305
  • 395