Forgive me if this has been asked before, but I’ve been doing a lot of searching and haven’t been able to determine the best solution to my problem.
I’ve been the sole developer on a project that now will likely involve another person. Up until now, I have never used a version control system before, other than simply backing up my files every day (cave man’s version control 🙂 ), but now I need a way for more than one person to update files.
After doing some research it seemed that GitHub would be a good choice, so I signed up for their cheapest plan and have been learning how to use it. I’m able to create repositories, update files, etc, but I have a problem which I’ll detail below.
I’m using WampServer on my development computer so that I can test changes before uploading the modified files to my live server. I have the root directory of the site located here:
C:\wamp\www\[project]\www\
My website uses a CMS, which I have installed on my local computer, so there are thousands and thousands of CMS files located in subdirectories and I only want to have my “custom” files (i.e. non-CMS files) uploaded to GitHub.
What is the best way to accomplish this?
I read about the .gitignore file to exclude directories and after a quick test it seems to work, so what I’m wondering is: should I make a new Git repository based at C:\wamp\www\[project]\www\ and then exclude all of the CMS’s directories by putting them in the .gitignore file? It seems like this should work, but I want to make sure it’s the right way to go about this.
Thanks for your advice!
Remove directories that you don’t want to use from git control, add them to .gitignore, copy this directories back.