A Better Understanding of Github.
One of the greatest inventions in the programming world is Git(Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency). Version control is a system that manages changes to a file or files. These changes are kept as logs in history, with detailed information on what file(s) was changed, what was changed within the file, who changed it, and a message on why the change was made. This is extremely useful, especially when working in teams or for yourself 6 months in the future (because you will forget things)!
To understand how incredibly powerful version control is, think about these questions: How many files of different versions of a manuscript or thesis do you have laying around after getting feedback from your supervisor or co-authors? Have you ever wanted to experiment with your code or your manuscript and need to make a new file so that the original is not touched? Have you ever deleted something and wish you hadn’t? Have you ever forgotten what you were doing on a project? All these problems are fixed by using version control (git)!
We are going to go over a typical workflow. This could be either a solo workflow or a collaborative workflow. Before we dive into the commands, there are few pointers to keep at the back of our heads.
- Configure your git.
- Create a folder and create a git repository (
git init; the saved history of the folder and files) in that folder.
- Create a file and track it with git (
git add), saving it to the history (
- Write a short bio in the file.
- Check what’s going on in the folder (
- Compare the file with the one in the history (
- Add the tracked file to the ‘staging’ area (
git add; this is an area before going into history).
- Save the file in the history (
- Look into your history (
- Create a GitHub account and create a repository.
- Set the URL of the new GitHub repository to your repository on your computer (
git remote; the command is usually provided from GitHub).
- Upload your repository on your computer (called local repository) up to your GitHub repository (called the remote repository; use
- Download from the remote to the local repository (
With all that has been talked about, it's important to note that any person or organisation should learn and incorpoarate GitHub to manage their projects because its easy make changes,track them making it convenient for multiple people to collaborate and complete tasks in real time.