Table of contents
No headings in the article.
As a beginner, it’s always a bit challenging getting conversant with some of these technologies in software development. A mind open to learning is the best tool that you can hold closely in your journey to greatness. In this article, we will walk through Git and GitHub which are essential technologies in the software engineering field.
Let us note that Git and GitHub are quite different. Git is a free and open-source version control system used to track files by programmers. It was created in 2005 by developers working on the Linux operating system. Git can be installed in all major operating systems like Windows and Linux. You do not need Github to use Git, but you have to use Git while using GitHub.
Whereas GitHub is a code hosting platform for version control and collaboration. Github is also a company founded in 2008 to make tools that integrate with Git.Alternatives for GitHub are Bitbucket and Gitlab.
This article will focus more on the Linux operating system. To install Git in Linux, you use sudo apt install git-all
It is always good to configure your Git with your local machine. You use the following commands: git config — global user.email “youremail@yourdomain.com” git config — global user.name “yourname”
You can confirm the set configuration is working by imputing the following command: git config — list
The expected output should be in this format: user.email=youremail@yourdomain.com user.name=Your Name
For Github, the best preference is to open an account. Currently, GitHub Desktop for GNU/Linux is not officially supported by GitHub, but there is a fork that hosts a version for Debian/Ubuntu & Red Hat/CentOS/Fedora distributions.
The following are important commands that you use when pushing your work to GitHub git init -it initializes your repository git add . git commit -m” name your commit” -you use this to name your commit as you push it to GitHub git push origin master -This pushes your code to your respective branch At this point, you're requested for your GitHub username and your password. Previously Github used normal passwords to push your code, but then currently we use access tokens as passwords to your GitHub account.
Git and GitHub are two interesting technologies and once you practice using them you get more comfortable. Consistency and having an open mind to learn are always the Key to everything.