Upload Project/Files To GitHub From Windows [For Newbies]

Hello Guys, In this tutorial i will show you how to upload your existing project/files to GitHub from windows. Here we will do it with command line. For that you need to install Git Bash command tool.

This guide is very simple so anyone can understand. Still if you have any questions after reading it, Drop them in the comment box. I will help you to resolve it. Now lets start, first of all lets get information about GitHub.

What is GitHub?

GitHub is closed source leading software development platform owned by Microsoft Inc. GitHub is free for open-source projects. In GitHub’s free plan, you can use unlimited free private repositories with a limited features set. Also you can’t add more than 3 people as a repository collaborators.

Why to use GitHub?

  • Keeps track history of every code change or feature.
  • Working smoothly in team of developers without messing up code.
  • Don’t need to keep project file in HDD [Hard Disk Drive] or Pen-drive.

GitHub Alternatives [Most Popular]


Now lets learn to upload project/files to GitHub step by step.

You need git bash tool installed in system to perform this tutorial using command line. If you haven’t installed it in system, download it from here and install it.

First Login in GitHub Account. If you haven’t register yet then register here.

Now Create a New Repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or .gitignore files. You can add these files after your project has been pushed to GitHub.



Now open Git Bash command tool and navigate it to project directory. Now, Initialize local[project] directory as Git Repository.

$ git init

Adds the files in the local repository and stages them for commit. Here we have used DOT(.) for adding all the project files. If you want to add some selected files then provide filename for each.

$ git add .

Now copy remote repository URL from your


Next commit the code with proper message. Here we are doing initial commit.

git commit -m "initial commit"

Add GitHub’s remote repository URL where local repository code will be pushed.

# Sets the new remote
$ git remote add origin https://github.com/chintanpanchal01/test-repo.git

# Verifies the new remote URL
$ git remote -v

Now push the code to remote repository.

$ git push origin master

If everything works fine then your code will be pushed to GitHub’s remote repository, Otherwise it will show specific errors. Resolve those errors and again push code to remote repository using above command.

I hope that you liked this tutorial. Let me know your thoughts in the comment. Please share with your friends too.  🙂

About Chintan Panchal

I am web developer having 6+ year of experience of web development. Currently working on laravel and have worked on codeigniter, cakephp, symfony. Thank you :)

View all posts by Chintan Panchal →

Leave a Reply

Your email address will not be published.

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