Home > Software engineering >  I'm trying to push my create-react-app code to github but its not pushing any code and only cre
I'm trying to push my create-react-app code to github but its not pushing any code and only cre

Time:10-11

i created a new react app using create-react-app as seen below

enter image description here

I pushed the code following the instructions set by github

enter image description here

But, as you will see in the next image, the code hasn't been pushed and only a readme file exists in the repo. How to I solve this?

enter image description here

CodePudding user response:

You only added the README file to staged files. To view the other unstaged changes use git status. Use git add * to add them all or add only the ones you want to push.

CodePudding user response:

It looks like you'r only pushing up your readme from the picture. Make sure you add all the files you want to commit and then push those also. You can use the command git status to see what files you have in staging that can be commited. You then add those files using the git add <file name> and then you can add a message using git commit -m 'message here' and finally you can do git push origin master

  • Related