How to install git on Ubuntu? How to create a repository in GitHub?

Hey there, Do you know? how to install git on ubuntu? Then let me explain to you

Install git on ubuntu by two steps

Step 1: check whether git is installed in your system by typing command in terminal

$  git version

Step 2: install git through the terminal

$ sudo apt-get install git

how to create a repository in GitHub

Step  1: create an account on GitHub


Step  2: start a new project

  1. Give a name to repository   “Demo program”
  2.  Give Description to repository “Demo to test”
  3. Initialize this repository with a README
  4. You can choose any license “MIT LICENCE”
  5. Finally,Click create repository

Step 3 : Configure git to work on GitHub

1: check whether you have user name email stored in git

$ git config  - - global - -list

2: give your GitHub username

$ git config - -global  "Anees"

Note: remember  to give your GitHub username in git

3: give an email address

$ git config - -global

4: check whether your name and email address updated or not

$ git config  - -global - -list

Step 4: Cloning  GitHub repository to git

Create a directory

$ mkdir  git_folder  

Get into the folder git_folder

$ Cd  git_folder

 Copy URL from GitHub git clone (URL)

$ git clone
GitHub git clone
Copy URL from GitHub

You can see Demo-program is present in folder git_folder by  $ ls command

Get into the demo-program folder

$ Cd Demo-program  

by $ ls command you can see two files LICENSE

Create a file which we want to commit it in github

$ touch  blog.c

You can see, a file called blog.c is created in folder git_folder by $ ls command

In order to edit file blog.c use $ gedit blog.c, which will open text editor, type the code and save

git commit
git commit command

Check git status

$ git status

Transfer  git file to git hub $ git add<file name>

$ git add blog.c

Again check git status it will be green

Commit the file (this will be a comment )

$ git commit -m   " a simple demo program"  blog.c

Final command to see file into GitHub

$ git push -u  origin master

Give user name and password

git push

How to delete GitHub repositories?

  1. Sign in to your GitHub account
  2. click the repository which you would like to delete
  3. then select the option settings
  4. scroll down to view delete this repository option
  5. enter the repository name which you would like to delete
  6. finally click I understand the consequences, delete this repository.

Check out some recent blog post

Mohammed Anees

Hey there, welcome to aneescraftsmanship I am Mohammed Anees an independent developer/blogger. I like to share and discuss the craft with others plus the things which I have learned because I believe that through discussion and sharing a new world opens up

Leave a Reply

Your email address will not be published.