Git is a source code management system. Git helps to monitor and manage code for industry standard documentation. Most people confuse Git and GitHub in the sense that they believe it can be used interchangeably but sorry to break it to you that you can’t. As the name implies (Git-Hub), a hub or repository for git. However, git can also be used with other code repositories like BitBucket, GitLab, etc.

Git is composed of components like local repositories, staging, and commit. Before the introduction of Git people managed their codes locally which didn’t enhance code collaborations and make it difficult for the development of software products. To make a local folder that consists of software files a local repository we need to initialize it by simply typing.

git init

The above instruction creates a hidden file named .git into the local folder, thus changing to the local repository that git is managing. After performing the above operation one can be rest assured that one is covered under the umbrella of git for source code management, reproducibility, and monitoring. Once any file is created in the local repository one can then monitor what is happening to the file by stagging it. To stage a file one performs the instructions:

git add file_name or git add .

The first instruction help to stage a single file in the directory while the latter is for stagging all the files in the repository.
To check the status of the current local repository one can simply instruct the git by using the instruction After a file has been staged it needs to be committed for a snapshot of the staged files which is one of the core functions of the git. To do this

git status
git status will show what is happening in the local repository by stating the files that are tracked and not tracked by git, files that are updated and all.
After a file has been staged it needs to be committed for a snapshot of the staged files which is one of the core functions of the git. To do this

git commit -m “ First commit”
The -m stands for message or tag for git to be able to track the commit though it automatically creates an I.D that looks like a hash key. For every commit, there is always a generated I.d that points to the commit.

However, to make the local files or repository available online it is then pushed to the GitHub or any other repository for source code storage. To do this, one must connect her hub account to the Integrated development environment used for code development. This will enable one to make the code accessible online. To do this
git push origin main

Lest I forget we have logging in git. Logging helps to keep track of all the commits made I.e the tracking of all the snapshots made after the commit. To check all the logs during source code management the instruction below is used;
git log

One of the most important operations in the git version control system is the ease of collaboration among team members. The git enable each member of the team to work independently on features of software and in the end a software product can be achieved after merging all the software.
The operation used in this case is the branch. The branch command line interface helps to create and list all the branches present in the workspace. The instruction goes as thus;
git branch name_of_branch and git branch

The first instruction creates a working tree directly while the latter list all the branches in the tree.
To switch between branches the instruction below is used;
git checkout branch_name
After all said are done the branches are merged with the main/master branch with the following set of instructions;
git checkout master
git merge branch_name

The above command lines help to turn source codes into a complete software product.

Moving forward there are some other operations in git, this includes stashing, clone, restore and many more.

I have been able to differentiate between Git and GitHub and also explain the various operations in git version control system/ source code management system.
If you have any questions kindly drop them in the comments section, but for now, I would say Adios…