Upload React Project to GitHub – push to repo

How to upload React JS project to GitHub repository. Push react app to GitHub repo steps. Github commands for pushing react project to a new repository.

Uploading React App Code to GitHub Repository

Step 1:

Go to github.com and create a new repository with the project name. Create an empty repository without any gitignore file / readme file.

Step 2:

Go to the project folder in the terminal window and use the below GitHub commands one by one.

git remote add origin https://github.com/username/repository_name.git

Use your repository name in the above command.


git branch -M main


git push -u origin main

Done…!

Now your react project code will be successfully uploaded to github repository.

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *