You should create a .gitignore file, this is necessary to
you specify what will be the untracked files.
For example, node_modules is a folder that you don't need to push to the Github because
everyone that install the project will have your own node_modules folder. Another reason is that node_modules is a large folder with thousands of modules if a contributor has a low connection and try to download it on their machine it takes a lot of time.
Another example is after to run the build command and the CreateReactApp going to create a folder build
that has static files generated for you to test locally, despite this, you don't need to push to the remote repository.
The idea is to avoid to send unnecessary files to the remote repository.
You should create a
.gitignore
file, this is necessary to you specify what will be the untracked files.For example, node_modules is a folder that you don't need to push to the Github because everyone that install the project will have your own
node_modules
folder. Another reason is that node_modules is a large folder with thousands of modules if a contributor has a low connection and try to download it on their machine it takes a lot of time.Another example is after to run the build command and the CreateReactApp going to create a folder
build
that has static files generated for you to test locally, despite this, you don't need to push to the remote repository.Here is a simple example:
For more, I suggest you read https://git-scm.com/docs/gitignore