Github git setup

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

git --version

if it is already installed, git version will be the output:

git version 2.5.0

If not installed Download and install git from https://git-scm.com/download/linux -you will find the command for your distro accordingly, some common are listed here:

fedora

yum install git

or

dnf install git

debian/ubuntu

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 /.gitconfig

You can check username with

git config --global user.name

Setting email address

in terminal add your github email address

git config --global user.email "[email protected]"

confirm by

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.

  1. With HTTPS
  2. With ssh

Here I am explaining about the HTTPS

We can push/commit/pull or do any operations on our github repo.

  • go to github.com
  • create a new repository

in terminal,

Initialize git

git init

add the changes

git add .

commit changes

git commit -m "your message"

add remote by

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





Posts you might like


Withdrawing Google Adsense Payment to eSewa in Nepal via Western Union

Quick how to guide on withdrawing your Google Adsense payment via Western Union remittance payment in Nepal. read more

Online Shopping Sites in Nepal

A curated list of ecommerce sites currently operating in Nepal providing different online shopping experience to Nepalese in different sectors. read more

Google Photos is really awesome! My Story

Sharing a piece of my story on how Google Photos eased my photo management. read more

Git remote basic commands

Git and Github basics read more

NASA Space Apps Challenge 2017 Kathmandu Nepal

International Space Apps 2017 held in Kathmandu, Nepal, Why should you participate in hackathons like NASA Space Apps, about the event blog and more. read more

Oracle Database 11g tutorials

all you need to know starting from very basic to advanced level of administrating Oracle Database 11g R2 edition. Also, this will be a supplement resource for TU Bsc CSIT... read more

Oracle Database 11g R2 installation on Linux with Docker

Installing Oracle Database 11g R2 with Docker on Linux is pretty easy and saves time and effort. In a matter of few minutes, you will have your Oracle database up... read more

Buy Viber Out Credit without Credit Card with eSewa

Now, you don't need a credit/debit card to buy Viber Out Credits in Viber to make call to different numbers even when they don't have viber. read more

Github header goes black, more design changes rolling soon

Github's navbar is black now! And yeah it didn't appeal me. More design changes coming soon. read more

How to activate 4G in Nepal Telecom Prepaid/Postpaid with review [video]

Nepal Telecom just launched 4g service for the first time in Nepal today. To actiate 4G in your mobile follow these steps read more

10 Best Games of the Year 2016 | Clash Royale tops the list

Clash Royale gaming app becomes app of the year in app store. Read who made to the top 10 best games of the year 2016. read more

Prisma becomes App of the Year | 10 Best Apps of the Year 2016

Prisma a fancy photo editing app becomes app of the year in app store. Read who made to the top 10 best apps of the year 2016. read more

Configuring Github Pages for site5 sub domains

Explaining to you, how you can configure DNS for sub domains in site5 site to github page sites in easiest manner. read more

Top Trending Technological Innovations in Nepal

The most used and liked technological products and innovations either developed in Nepal or the general public platforms that have brought major changes in the lifestyle of Nepalese people. Also,... read more

How to uninstall Chinese 360cn Software/malware from your Windows Computer

Remove 360cn Chinese malware from your computer in easiest manner read more

Install iOS 10 on your device

Install the biggest update from apple to your iphone, ipad or any iOS device, the new iOS 10 is out now to the public. Install it today. read more

Doing facebook live from your computer

Live stream to facebook from your laptop or desktop computer in easiest way using OBS read more

Internet setting for Nepal Telecom and Ncell in iphone

Internet/3g/GPRS/4G/LTE Configuration setting for Nepal Telecom(NTC) and Ncell in an iphone in easiest way read more

What is fbstatic-a.akamaihd.net?

fbstatic-a.akamaihd.net is a Content Delivery Network(CDN) used by facebook read more

How to download a photo album from your facebook

Download albums from facebook at once. read more

Disabling automatic loading of last session in Sublime Text Editor

You might have got irritated everytime seeing two windows of Sublime Text Editor being opened every time you open Sublime. Here is a quick fix to it. read more