In this blog post, I am writing how you can set up
git a version control system in your computer system and connect and authenticate it with GitHub.
Open terminal and check if git is already installed
if it is already installed, git version will be the output:
git version 2.5.0
If not installed Download and install git from
you will find the command for your distro accordingly, some common are listed here:
yum install git
Grow your YouTube channel quicker with TubeBuddy.
dnf install git
apt-get install git
If git is already installed we can get/update latest version of git by git itself
git clone https://github.com/git/git
Setting Git username
In terminal, lets setup username
git config --global user.name "username"
This will be written in a file
Get $100 Credit on DigitalOcean for Cloud Hosting. Claim Now!
You can check username with
git config --global user.name
Setting email address
in terminal add your email address
git config --global user.email "[email protected]"
git config --global user.email
note: we are adding username and email address for every repository on our computer
Authenticating with GitHub from Git
There are two ways to connect with Github from our computer with git.
- With HTTPS
- With ssh
Here I am explaining about the HTTPS
We can push/commit/pull or do any operations on our github repo.
Don't forget to subscribe!.
- go to github.com
- create a new repository
add the changes
git add .
git commit -m "your message"
add remote by
Grow your YouTube channel quicker with TubeBuddy. Join Today!
git remote add origin https://github.com/username/repository_name.git
we can get origin address in repo’s setting too while creating repo
after adding origin,we are ready to push to github
git push -u origin master