The future is now, and if you’re not using some sort of version control you are missing out. The way it works is a way to control merging code, managing bugs, and having a stable version to fall back on in a emergency garbage fire.
For me it is a way to keep all of my programming code together incase the unspeakable terrors of things such as hard drive failure occur. You are a simple:
User$ git clone RepositoryName.git
away from getting all of your work back; as a college student I use approximately 5–6 different computers every day that consist of Linux, Mac OSX, and Win10. Having the ability to quickly stay up to date with my projects is a huge benefit. That’s my simple story on why to use it, now for an introductory to get up and running with it:
1. To start download GitHubDesktop
Download the version that matches your operating system…
2. Open and click File->new Repository… (Mac: ⌘+N) (Windows10: Command+N)
3. Name your repository and choose where you want to save it to locally
Click “Create Repository”
4. To publish to GitHub click “Publish repository” (It will probably prompt you to log in if you haven’t done so)
5. If you go to your Github Profile and click on “Repositories” you will see it there now.
6. How to add files
Here I created a file called SampleText.txt and saved it to my local file called SampleRepository where I created the original repository’s Local Path
7. Creating a commit
Name the title of the commit and if you want you can put a commit description with it.
Click “Commit to master”
8. We’re almost done, the last step is to push it to the origin
(Tip: Where my “Push origin” might say “Pull origin” if that is the case click the “pull origin” and then click again when it says “push origin”)
9. Congrats! you have a working repository on your machine you can check it out on your Github page to validate everything worked!
Cloning The Repository
In the case want to access it on another PC here are the steps to clone the repository.
1. Go to File->Clone Repository…
You can either search it directly from your created repositories
Or you can download the URL download link and download it from there like so:
2. It should start cloning the repository locally
3. You then just need to do a “Fetch Origin”
4. Congrats you have a working remote repository on your computer!
Hope this tutorial has been very helpful for you and saves you a lot of stress knowing all of your work in backed up safely.