How to Upload Your Project to GitHub

This tutorial is basically aimed for the users who are learning about uploading their first project (repository) in GitHub via version control tool called Git. It’s obvious that confusion hovers around you when you’re just getting started with Git.


Binod Jung Bogati


November 2, 2016

Git is a version control system aimed to handle project at speed, data integrity, and support for distributed, non-linear workflows.

I’m assuming that you already had worked with your project locally. Let’s say you are currently working with Javascript project with HTML, CSS and js file in your project folder.

In the following screen, you can copy it down where you need it if you click the button (right side of the screen) to “clone in desktop”.

  1. Initialize Git
 git init

This will start monitoring your changes (logs in .git folder)

  1. Add files and folders
git add .

. [dot] will add all your files & folders

  1. Commit Changes
 git commit -m "This is my initial commit"

This will records changes to the repository

  1. Add Remote Origin
git remote add origin

creates a new remote called origin located at my-project-url

  1. See Linked Repo
git remote -v

see your linked repository

 git status

checks the current state of the repository (optional)

  1. Push Changes to GitHub
git push -u origin master

-u is short version of –update

push the commits in the local branch named master to the remote named origin (GitHub)

Note: You’ll also be requested to sign in to GitHub account.

What we did so far?

git init 
git add . 
git commit -m "This is my initial commit" 
git remote add origin 
git push -u origin master