# How to upload project to Github on windows

- Link: https://technotaught.com/how-to-upload-project-to-github-on-windows/
- Published: 2020-04-10T14:04:38+05:30
- Author: Ashishkumar Vishwakarma

In this tutorial, we explain to you how to upload a project to Github on your Windows
desktop.

### What is GitHub?

GitHub is a code hosting platform for collaboration and version control. GitHub 
lets you (and others) work together on projects.

## Let see how to upload a project to Github on windows

### 1. Install git and create a GitHub account 

The first two things you’ll want to install git and create a free GitHub account.

Follow the instructions [h](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
[ere](https://technotaught.com/install-git-and-github-for-window-or-linux/) to install
git (if it’s not already installed). Note that for this tutorial we will be using
git on the command line only. While there are some great git GUIs (graphical user
interfaces), I think it’s easier to learn git using git-specific commands first 
and then to try out a git GUI once you’re more comfortable with the command. 

Once you’ve done that, create a GitHub account [here](https://github.com/join). 
Accounts are free for public repositories, but there’s a charge for private repositories.)

### 2. Create new Repositories

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

Click on New repository

![How to upload a project to Github on windows](https://help.github.com/assets/images/
help/repository/repo-create.png)

Repository means a folder which contains all files. Simply type a repository name
and give a description(optional) and click on a **Create** **repository**.

![How to upload a project to Github on windows](https://technotaught.com/wp-content/
uploads/2019/07/image-14.png)

Github repository

When you click on Create repository this quick setup is open. we follow this command
to upload a project.

![How to upload a project to Github on windows](https://technotaught.com/wp-content/
uploads/2019/07/image-29.png)

### 3. Open Git Bash

Simply search **Git** **bash** and open.

![git bash](https://technotaught.com/wp-content/uploads/2019/07/image-13.png)

### 4. Change the current working directory to your local project.

Means make a directory anywhere. Paste the path of that directory into bash.

 To do that write in bash:-**_ cd ” path-name ” _**

![How to upload a project to Github on windows](https://technotaught.com/wp-content/
uploads/2019/07/image-16.png)

Or you can go to that folder > right-click > **_Git Bash here_**

### 5. Initialize the local directory as a Git repository.

To do that write in bash:-**_ _** **git** **init** **_ _**

You can see **_.git_** folder in your folder.

![How to upload a project to Github on windows](https://technotaught.com/wp-content/
uploads/2020/04/image.png)

## 6**. Add a file to the staging area**

 Add a file by using ” **git add <file-name>** ” for a single file.

 To add all files, use **“git add** . “

![add file in github](https://technotaught.com/wp-content/uploads/2019/07/image-
22.png)

###  7. **Commit a file into the git repo is to write a commit message.**

[⌊add file in github⌉⌊add file in github⌉[

### 8. **Push the file into a remote repository. {{Github}}**

`git remote add origin git@github.com:"Username_on_github"/"Repository_Name"`

![](https://technotaught.com/wp-content/uploads/2019/07/image-30.png)

### 9. Setting up Git

If we are setting up the git for the first time, we can configure the git with name&
email.

git config –global user.name “Your_Name”
git config –global user.email “Your-Email”

![Setting up Git](https://technotaught.com/wp-content/uploads/2019/07/image-21.png)

### **10. Final PUSH**

When to type “**git push origin master**” a pop Github login window opens. Enter
the username or email and password and click on the Login button.

![login in command line](https://technotaught.com/wp-content/uploads/2019/07/image-
31.png)

![push command github](https://technotaught.com/wp-content/uploads/2019/07/image-
32.png)

### 11. Check to Repository

Refresh Repository page and you will find your files in repositories.

![repository](https://i1.wp.com/technotaught.com/wp-content/uploads/2020/04/image-
2.png?fit=800%2C524&ssl=1)

## Adding an existing project to GitHub using the command line

Here you can see I add 1 file, that name is** technotaught.txt**

![Repository ](https://i0.wp.com/technotaught.com/wp-content/uploads/2020/04/image-
3.png?fit=800%2C373&ssl=1)

To push this file into the GitHub repository follow the step below

### **1. Add a file to the staging area**

 Add a file by using ” **git add <file-name>** ” for a single file.

 To add all files, use **“git add** . “

![how to upload a project to Github](https://technotaught.com/wp-content/uploads/
2019/07/image-22.png)

### 2. **Commit a file into the git repo is to write a commit message.**

Command: -> **git commit -m “first commit”**

###  **3. Final PUSH**

 Command: -> **git push -u origin master **

![how to upload a project to Github](https://technotaught.com/wp-content/uploads/
2020/04/image-4.png)

###  4. Check to Repository

![how to upload a project to Github](https://i1.wp.com/technotaught.com/wp-content/
uploads/2020/04/image-5.png?fit=800%2C509&ssl=1)

So this explains, how to upload project to Github on windows. Let us know in the
comment section if you have any problem related to Github.

### Share this:

 * [  X ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=twitter)
 * [  Facebook ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=facebook)
 * [More](https://technotaught.com/how-to-upload-project-to-github-on-windows/#)

 * [  WhatsApp ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=jetpack-whatsapp)
 * [  LinkedIn ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=linkedin)
 * [  Email ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?subject=%5BShared%20Post%5D%20How%20to%20upload%20project%20to%20Github%20on%20windows&body=https%3A%2F%2Ftechnotaught.com%2Fhow-to-upload-project-to-github-on-windows%2F&share=email)
 * [  Reddit ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=reddit)
 * [  Tumblr ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=tumblr)
 * [  Pinterest ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=pinterest)
 * [  Telegram ](https://technotaught.com/how-to-upload-project-to-github-on-windows/?share=telegram)
 * [  Print ](https://technotaught.com/how-to-upload-project-to-github-on-windows/#print?share=print)

### _Related_
