Introduction to Git
How to use it and it's purpose, for regular users and developers.
Please note that this tutorial is intended for Windows users.
Git is...
Git, a version control system, is an alternative program to subversion. Git, however, is more advanced and appeals to a developer on higher levels, offering full repository history while offline and simple-to-use merging while opening up to a wide range of developers via the fork system.
However, Git can be hard to use for the average user, and can be simplified by downloading an user interface embedding Git.
Obtaining Git
Git can be downloaded from here, or choose the link below that corresponds to your operating system.
Please note that the table below may be outdated and it is wiser to use the above link.
Once you've downloaded your installer, you can proceed to install the application. This should be self explanatory, but if not, I will describe how to do so on Windows.
Open the installer and navigate your way through until you get to "Adjusting your PATH environment". You should be presented with three options. If you're a developer, it would be wise to choose the second one (Run Git from the Windows Command Prompt), however, if you're a normal user or a new-developer, feel free to leave it as default (the first one).
Proceed to make your way through the rest of the installer and install with default values.
Once Git has installed it would be a good idea to restart your computer.
Installing an User Interface
A great free user interface is TortoiseGit.
To download TortoiseGit, please visit this page or click this direct download link.
Once the installer has downloaded, open it and let it guide you through the installation (keep default values).
Once the installation is completed you should restart your computer.
Obtaining and Keeping a Repository Updated
In this segment, you will learn how to download and keep a repository updated. We will be using srl-reflection as an example.
First, create a folder called "Reflection" in your Simba includes folder.
Next, you need to get the Git clone URL. You can do this by going to the main repositories github page and copying the link.
Next, you will want to right click the Reflection folder and click "Git Clone..."
A window titled "Git clone" should pop up, paste in the Git clone link and then remove the trailing folder in Directory input.
Click OK and let it Clone the repository. When it's done you should see a window like so, and click Close.
Congratulations! You've obtained a clone of srl-reflection!
Now, here comes the simple part. To keep the repository updated, periodically right click the directory and select "Git pull", this will pull all new updates to your local clone.
Click OK to the Pull window that appears, and you should see a window something like this when it's done updating, click close and you're good to go!
Developers
Using Git as a developer is extraordinary. Git has the ability to work offline (unlike a non-local subversion control) and that enables itself to be able to execute (all) commands faster than subversion. Git also has an excellent merging process. Files can be merged together from almost any version of the repository, regardless of how outdated the clone is. This appeals to a developer more because [with multiple people], some may make changes, but be a repository or five behind.
For this segment, I will be using RRL as an example.
First, create your folder and clone the repository of your choosing, if you do not know how to do this, please read until you do under "Obtaining and Keeping a Repository Updated".
Uploading changes
Every time you change a file, it should become a red file with an exclamation mark, signifying that it's modified.
To commit changes, you simply go to "TortoiseGit > Git Commit -> "master". Select the files you wish to commit locally, enter a message, and click OK.
When it's completed, click Close on the opened dialogue.
Please note. When you commit all your changes you're able to update your repository without losing them (the changes), as they will be merged (with any new updates). You run the risk of losing your changes if you don't commit them locally (plus, it shouldn't be allowed). NO COMMITED CHANGES ARE LIVE UNTIL YOU PUSH TO THE SERVER!
When you're ready to make the changes live, or you regain internet access, right-click and select Git Push. Enter your password to your github account and let the magic happen. Click Close when it's finished.
Updating the repository
When updating the repository, you may have some un-pushed commits. Before updating, make sure all changes are commited to your local repository. Right click the folder and select Git pull. This will initiate an update sequence of your clone, please note that any password requested is your Github password.
Once updated, all files should be merged respectfully. If there are any conflicts, you can easily resolve them by right clicking and selecting "Resolve" under the TortoiseGit menu.
Please Note. After updating to the latest push, you will be allowed to push commits to the server.
Accepting a pull request
Coming soon.
Tips & Tricks
Optimizing your right-click context menu for user friendliness.
Coming soon.