x

So I'm curious to hear what some of you out there would do under this type of a scenario.

Myself and another developer took over the ownership of a website from an outfit that had been handling it for some time. The company that had been handling it honestly had a lot of work on their plate, so they weren't able to put the time into the site that the owner needed. After some discussions with that company and the owner of the site, the development of the site was passed over to us.

I am a major proponent of using source control. However, I've never set up a web project under source control before. I know I could go down the road of Kiln/Git/Mercurial, but honestly, for what we're doing with this project, I just need the ability to keep a basic history of changes made within the site. No need for multitudes of branches with 30 developers hitting it.

So honestly, I've really just looked at using SubVersion, and using one of the free services available out there to host the site source. My question is this though.

When I think about hosting my source, I know in particular environments (PowerBuilder, Delphi, .NET), which directories get included. Which files get included, etc.

On the web side, I'm just not sure. I've been looking through things online, but just can't seem to find documentation that covers which each directory is for, etc.

So I have the following directories off the root of our web project...

 .codeguard
 .cpanel
 .htpasswds
 .pki
 .sqmailattach
 .sqmaildata
 .ssh
 .trash
 access-logs (this shows as a shortcut)
 etc
 logs
 mail
 perl5
 public_ftp
 public_html
 ssl
 tmp
 www (this shows as a shortcut)

As for the work I've done up till now, currently I've just had filezilla hitting our site. I've made my changes, and pushed them up to the live site.

THIS IS A RECIPE FOR DISASTER!!!

All my work I've done has been in the public_html directory. However, I'm not sure if I should place the rest of the directories in source control as well. Or if they are more dynamic and they change based on things that are updated in the cpanel.

If anybody possibly has some links to information on this, or could just pass some pointers onto me, I would really appreciate it. I know my goal of course is to run the entire site locally. Do all my work there, and after testing, check it into source control and push it up to the site.

Any thoughts anybody might be able to pass onto me would be greatly appreciated!!

Thanks Everyone!!

Jeff Gibson
Intercept Solutions
Nashville, TN

more ▼
asked Aug 04, 2015 at 05:44 AM jeffgibson 0 avatar image
(comments are locked)
10|600 characters needed characters left

You should really look into Git. It's a very flexible environment and there's lot's of info on how to use it on the web. I've used both git and SVN for many years, and I like it way better the SVN for a number of reasons. It's also the #1 choice of most web professionals.

Jim

more ▼
answered Feb 10, 2016 at 10:08 PM cbad 1 avatar image
avatar image jeffgibson Feb 24, 2016 at 07:33 AM

Appreciate the follow up on this Jim. Sorry for my late reply. So my question would be this. I've heard lots of good things about GIT as well. The question is, do you just take the entire root of everything that makes up the website and jam it into source control? Or are there some directories that are more live. Meaning the cache files, images, etc. Just curious what directories you avoid.

Thanks for any suggestions Jim!!

(comments are locked)
10|600 characters needed characters left

Hey Jeff-

You're basically in control. There's a special hidden file named .gitignore that allows you to exclude anything from the repository. It goes into the root of your project and is honored recursively. So you might include:

 .gitignore
   *.bak
   *.log
   private-stuff/*

This would then exclude all bak and log files and everything in the folder private-stuff.

.gitignore also has scope. So the one in your root folder applies to every folder in your project. But if you have another .gitignore at some lower level, it only applies from that point forward. It's really pretty powerful.

Plus you control it by what you decide to add to the repository. So if you never add a group of files, they aren't included in the repository. Trusting this can be somewhat open to human error, of course, but it still works. It's all pretty much common sense, but very flexible.

Hope this helps.

Jim

more ▼
answered Feb 25, 2016 at 05:08 PM cbad 1 avatar image
(comments are locked)
10|600 characters needed characters left
Your answer
osqa.question.ask.tags.preview.show

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:
"The unexamined life is not worth Living."
Socrates (469 – 399 BC)
This Question and Answer site is an outreach effort of the Association of Software Professionals. Without a doubt, the biggest benefit of joining the ASP is the member forums. Unfortunately, those forums are not available to the general public.

There are some extremely popular question and answer sites available such as StackOverflow & Programmers. However, those sites often close a lot of questions that deal with how to sell, market and operate a small independent software company.

Join the ASP today. Annual membership is only $100.
http://asp-software.org
Jeff, This space is available.

Topics:

x1
x1

asked: Aug 04, 2015 at 05:44 AM

Seen: 202 times

Last Updated: Feb 25, 2016 at 05:08 PM