Version Control System
What is “version control”, and why should you care? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
Git is revolutionary not just as a program or a language, but also as a work-flow. I’m confident that even those who will never type a single letter of code can benefit from understanding the way Git works and how techies use it for sharing, collaborating and optimizing overall process management.
Let’s look at it’s basic concepts
Repository/repo: The database storing the files.
Branch: Create a separate copy of a repo for use on your computer. It seprates the working area/ code to not being touched by other developers who are working on other branch
Commit: A message with commit id referring to the stage where you make changes in your code. Every time you save your work, Git creates a commit. A commit is a snapshot of all your files at a point in time. If a file has not changed from one commit to the next, Git uses the previously stored file. This design differs from other systems which store an initial version of a file and keep a record of deltas over time.
Push: Push is an access level on the repo, if you have no push access you will need to make a pull request. In a simple words, upload your work to Repository where you stored eg. Gitlab
Pull: If you have no Push access you can make a pull request which will notify the repo owner you want to merge your changes into their code. This process will make your code in-sync with repo.
Revert/rollback: Go back to a previously saved version of the codebase/repo. We will go deep in further post, for now you can skip this process.
Things to remember.
Git and GitHub/ Gitlab/ Bitbucket/ Microsoft TFS
Git and GitHub/ Gitlab/ Bitbucket/ Microsoft TFS are two separate things, Git is a free and open source version control system whilst GitLab uses Git technology to host your repositories on the GitLab.com servers.
Looking for more detailed resources regarding the git you can refer the below links.