How to Push Code to Github Remote Repository
Tags: github, productivity, git, beginners
Published: 2022-02-14 16:56:27


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrwuei31180ooy3bognd.png)Hello Guys today I am going to Show you how you can push your code from your Local system to Github Remote Repository.

Lets get Started...

## 1. Download The Git for your system from the link below - 
https://git-scm.com/download/win

## 2. After Download Install the git to your system

## 3. Then Go to the folder where your code exists

## 4. Then right click on your mouse and click "Git Bash Here".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rkj5g5rp0qtqjq6ljo5.png)
## 5. In the terminal run the command "git init"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzy4qcoqh3j90dc0q9yj.png)
## 6. Then run the command "git add ."
It will add all the files in the directory to the commit stage

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe54c946bypoyssn0fhz.png)
## 7. Then run this command ' git commit -m "First Commit" '
It will commit all the files on your loyal system.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvxqdrvoi1nbdtsh0j5r.png)

## 8. Now go to github.com and create an account and then create a new repository 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ro22nbaym9s46sloxvo7.png)
## 9. Now enter the Repository name
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lqwalv1daqr5bnm4jpg.png)
## 10. Then click create repository
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kefuu8cozfklvqbtvjil.png)
## 11. Now copy the link in the box
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iu7og7ro4lu7fk0dsvk2.png)

## 12. Now go back to your folder and again right click and select "Git Bash Here".

## 13 Then run this command " git remote add origin YOUR_COPIED_LINK_FROM_THE_BOX"
EXAMPLE - git remote add origin git@github.com:ShubhamTiwari909/MERN-Mongo-.git

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cyihkcmn09kazz9ltwf.png)

## 14. Finally run this command "git push origin master"
It will push the code to the master branch in your remote repository.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5nbmgq1cdw0dw2h9u2k.png)

## 15. Open github.com and check the repository your files will be shown there remotely, Congratulations you can now use github to push your code from your local system to remote repository.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0a0h73w5r8y4jfigju56.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83ndi3e6khj5sr2gv4fp.png)

NOTE - In step 11 , copy the SSH link not the HTTPS.

Thats it for this post.
THANK YOU FOR READING THIS POST AND IF YOU FIND ANY MISTAKE OR WANTS TO GIVE ANY SUGGESTION , PLEASE MENTION IT IN THE COMMENT SECTION.
^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well

https://dev.to/shubhamtiwari909/media-query-with-css-grid-1l7a

https://dev.to/shubhamtiwari909/styled-componenets-react-js-15kk

https://dev.to/shubhamtiwari909/introduction-to-tailwind-best-css-framework-1gdj