Git/GitHub local Environment

Hi Everyone,

It has been sometime since I posted on the Sitepoint Forums, think last time I was under a different username of stu567blue, I’ve since lost my e-mail account for this account along with a few other bits and pieces.

I need a little help with getting my head around Git and Git Hub. I have a magento store which is stored on a VPS server based in the UK. I have XAMPP installed on my Windows 7 computer. I’d like to know the best way to set up a local version of the online store so that I can work on the store locally and push any amends to store.

The VPS server runs on Linux CentOS 6, and I’m sure there is a way to set this all up so that I can do amends to the local version of the site before publishing them onto the live site.

Any help would be great.

thanks

Rob

Quick version:

You will want to install Git for Windows, followed by GitHub Desktop or GitKraken, or SourceTree

Next you will want to create a .gitignore file, as you will likely have some configuration files that have passwords in them, that you do not want to show up in your public git repo (if you are using a private repo, this step is optional).

Simply put, you create a file named .gitignore in the top level of your project, and each line references is directory or file you want to exclude from git.

Example: (each file/folder you exclude should be on a separate line)

path/to/config.php
path/to/another_file.php
path/to/folder/

Lastly, using GitHub Desktop, GitKraken, or SourceTree, you will tell it to create a new repository, using your project folder as its source. I don’t recall the exact steps, but this lays it out really well for GitHub Desktop

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.