Back to Top

Basic Github commands

Basics about Github with commands

Git is a distributed version control system which is originally written by Linus Torvalds and used for the management of the code. After the launch, Git also achieved great success in other projects, especially in the Ruby. At present, many well-known projects are using a Github as version control system for managing their code.

Here we learn how to manage code in github.

In this article, we will describe about to manage your code into the GitHub.So, To manage your code on Github, you need a GitHub account, if you have not registered with Github yet, please go on URL and register.

If you are already registered with GitHub account, Log in to your Github account and follow the below steps

1. Open a browser,log in to your GitHub account and create a new repository as shown:


2. Next, jump to the next page, enter repository name such as TestCreativedev or according to your project. Here you can select repository type which is private or public. You can create the private repository with a premium membership. You can also initialize readme on this page.


3. Click on “Create Repository” button and GitHub automatically create a repository and give you a simple command for this project to host your file.

4. Now you have your repository URL on Github which is known as Clone URL and you can find it out on the right side of your repository.


5.Your GitHub repository is ready to use.Open a terminal and enter a new repository clone URL on the command line through command prompt.

6. Once you enter git clone URL on the terminal, it will ask for Username and Password so then enter the account Username and password.Your repository will be copied to your local system.

Now,let’s see some basic useful Github commands:

1) touch : This command will create a file where you can add information about your project.

2) git init : This command is used to initialize a local git repository and generate hidden .git directory

3) git add filename: This command is used to add files to the repository.

4) git commit -m “first commit”: This command is used to commit described files to GitHub with message and it will not up your changes to GitHub server until you push changes.

5) git remote add origin URL: This command in git add the local repository origin and the specified remote repository address.

6) git push origin master: This command will push local commits data to the specified remote master branch.

7) git status: This command will provide the status information of repository.

8) git pull:This command is used to pull the content on the remote host.

Hope this article shed some light to GitHub novices.If you have any query, you can ask here in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

Welcome to Creative Dev

Posted on 7 years ago


To parse CSV Data in PHP

Posted on 7 years ago


How to use Replace function in MySQL

Posted on 7 years ago


Getting Started with CodeIgniter

Posted on 7 years ago


Hello world

Updated 1 month ago

Nick Carter

In depth Understanding of Laravel Core

Updated 3 months ago


ECMAScript 6 New Features – 2

Updated 1 year ago


The Reader’s Poll – June 2015

Posted on 4 years ago


The Reader’s Poll – August 2014

Posted on 5 years ago


The Reader’s Poll – June 2014

Posted on 5 years ago


The Readers’ Poll – May 2014

Posted on 5 years ago


The Readers’ Poll – August 2013

Posted on 6 years ago