Create-react-app and github

Create-react-app and github
0
#1

Hi,
I’m pretty new to react and to git, but I’m planning to make a new react app and put the project on github. I’m using VS Code to do the actual coding offline. Then I plan to upload to github. I’ve found places that describe how to do it.

My problem is that when create-react-app makes my default new workspace for my app, the folders add up to 301MB – almost entirely the node modules. Surely this isn’t all meant to go up onto github.

#2

You are correct. In fact, you do not even need to include the build folder on GitHub. When you create your git repo locally, you will need to create a .gitignore file with node_modules.

I found this .gitignore file on facebook’s create-react-app repo.

#3

Thanks for that.
You know what? create-react-app automatically made one of those. Now that I know what to look for I can see it in the cryptically titled “.gitignore” file!

#4

Or you can you netlify.com it is really helpful and easy to use. You need not build the project everything is done under the hood. You can give it a try. It is really good for deploying static website

#5

Thanks, Deeksha73
I will bear that in mind. But I want to use github for now because a couple of the jobs I’ve applied for have asked about github. I’ve currently got no footprint there except absolute beginners stuff.