DEV Community

Cover image for Git and GitHub Basics for Beginners
Jimmy Taravia
Jimmy Taravia

Posted on

Git and GitHub Basics for Beginners

Hello everyone!!

I am Jimmy Taravia and I am a learning web or precisely learning software developer and a writing enthusiast who notices things and points them out to people in my Blogs (Jimmy’s Blog: https://get-rid-of-bullshit.blogspot.com/ ). In this post, I will be explaining some basic Git terminologies and facts for software development learning beginners, which are useful if you entering into the development field or want to contribute to any open-source projects on Github.

The first and most basic question, that arises among all is why Git and Github even matters? What is the difference between those two? So let me explain Git first and would explain Github afterward.

Git is a distributed version control system or also can be called a decentralized version control system. It means that many developers can work on a single project. So it keeps track of your code history and changes that you and others make in it.

Basic Command to learn for starting Git and Github are:

1. git init: It initializes the git repository.
2. git add: It adds file(s) to the index.
3. git status: It helps us to know the status of our working tree in the pulling and pushing code changes in remote as well as a local repository.
3. git commit: It means to commit the changes in the index.
4. git push: It pushes the changes done from local files at the index to the remote repository.
5. git pull: It pulls the latest files from the remote repository to local.

Now, moving to the Git installation process:
You can download it in windows and mac through the below given websites:

Windows: https://git-scm.com/downloads/win
Mac: https://git-scm.com/downloads/mac

For Linux:
You can use the given commands:
Linux (Debian): $ sudo apt-get install git
Linux (Fedora): $ sudo yum install git

Once you finish installing Git on your device,
1) Go to your command line and write the command git –version and hit enter.
2) If you get the version of the git, you have installed the git successfully. But if in case you get some error, there is nothing to worry about, try to uninstall the available git that you installed and do the step again.

Now, coming to Github. It is the largest web-based git repository hosting service. You can relate git and Github as the cloud servers and web-service. For example, the servers stores the data available on the internet, and the web service connects us or act as a bridge between us and the information which we want from the servers which contains a huge amount of data.

So, these are common terminologies and facts about Git and Github, which we use in making projects.

There are so many other commands which I will try to discuss and explain in an upcoming part of the series.

Top comments (1)

Collapse
 
nirbhayparmar profile image
Nirbhay Parmar

very good and precise explanation for absolute beginners, many beginners often confuses between git and GitHub.