Well, when i ask someone why isn't using git, they usually answer that they find it too complicated. Actually git is pretty easy to learn and often it's complete butt saver.
First of all git != GitHub
Git is Version Control System that you can use standalone. You can use it to use github, but you can also it to create and use your local and remote respositories.
GitHub is webpage that enables you to store data on their server using git system. If you want to use it for free you have to publish the code. You can also do private repositories but that requires PRO account
The main rule you have to understand is in most of cases folder name = repository name. To make work easier you might want to download github for windows (click). Probably first thing you want to do is create repository (you can do that their webpage but i prefer the way i'm going to show you). You'll need to click that large "+" button in upper right corner. You can choose what action you want to perform. We'll click "create" because we want to create new GitHub repository. You can also clone (download repository from the remote server) or existing local repository to the github manager/
Yep that's all. Once you click the big "Create Repository" you will have your very own beautiful empty github repository.
If you was watching closely you have probably noticed that little dropdown list called GitIgnore. GitIgnore actually is file that describes what file ignore and don't watch. You'll probably want to use one to avoid uploading temporary files. You can use my file if you want so:
Maybe we should add some files to that repository, shall we? All you have to do is basically put files you want to version control into folder you choosed when creating repository. Then you'll have to again open GitHub for Windows window and select files you want to add to commit (commit is portion of data) and write some descriptive text about what you have done, what's new in this commit etc. All you have to do now is just click the push/synq button (if that's your first commit it would something like "publish")
Tip1: If you're using auto formatting of your code you should do that before first commit, because every space added to the verse counts as a change so if someone would auto format 1000 lines of code and someone else would merge that with his code he had to accept all the changes separately.
Tip2: You should write as descriptive description as possible
Git is used to save your very but when you mess something really bad. For example look at the first attachment. I did something terrible i wrote "Line 4" in line 3 which is unforgivable. How could i do that? Let's fix it using using GitHub for Windows.
1. Select commit that you want to revert to (blue arrow)
2. Click revert button (red arrow)
This will create new Commit with changes revert to selected commit. Why is this so cool? Because you don't lose that messed up code. It still archived as commit that has been overwritten but new one and if you want so you can revert reverted changes.
And that's all for today. You should now know how to create new repository and how to add files to the system. When you make some changes just open the GitHub for windows select changes you want to upload, create a commit and push it.
See you next time!;
Next time (if there will be next time...) i'll try explain to you how to use basic plain git shell stuff.