I am considering you that, git is installed in your computer. Although if you are new comer, then, this is for you that, install git in your computer and create an account in github is required for uploading code in githube. You can take a look into ‘github for web developer’ where installation and creating account process are available.

Congratulations, you have git installation in your pc and github account. Lets move in your computer where you can create a project folder. I am choosing desktop for better understanding.

create folder for github project

Now go inside your folder and create few files. Add some html files into this folder that will be uploaded in github repositories. I already added four files into my folder. Well, now write click on your folder and choose Git Bash from that list. If you are installed git software, I am sure enough you will get this option. Otherwise, look how to install git from here.

 

 

 

Open git bash in windows

Now time has come to follow from github account. Just login in your github account and click on repositories where you want to upload your project. Sure enough that you will get few lines of code. Well, now write the following code in your git bash and hit enter.

git init

 

Write git init in github

Now, there is an optional option to add readme file. Right now I am skipping this. If you want, then write and edit your readme file.

git add README.md

Now add all of your files from that directory. Just type git add . as like as following.

 

git add .

Now write following code in your git bash and hit enter button.

It is important that, you can write any thing instead of “first commit”. It looks like message. Well… everything is finished. Now time has come to upload your code in github. Write following code in git bash.

 

git commit -m "first commit"

It is important to note that, after origin word, the url will not match with you. It will be https://github.com/Your_User_Name/Your_Repository_Name.git. Well, now question is that, how can I get this. Just look into your repository in github, and sure enough that you will get 6 lines of code. Just copy of that line and paste in git bash.

git remote add origin https://github.com/Your_User_Name/Your_Repository_Name.git

 

upload project in github.com

Now copy following code in paste into git bash and hit enter.

git push -u origin master

Now enter your username and password and hit enter button. It will looks like below-

github access info

If you are putted all the auth information, I am sure enough the you will get success message. Well done. Now check in your github account that, every files are in github.com.

Well done, you have successfully finished uploading your project in github. Thanks for reading.

About the author

Thouhedul Islam

I am really an error... huh