-4

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

Darius
  • 7
  • 4
  • Note that `git push` pushes *commits*, not files. Commits do *contain* files, but each commit has a full snapshot of *every* file, as if it were a tar or zip archive. You made a commit containing exactly one file: the `README.md` file. Future commits will also contain this file, plus any files you `git add` before you `git commit`. – torek Oct 10 '21 at 23:40

2 Answers2

0

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.

TheElmo
  • 86
  • 5
0

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

Mohamed Ali
  • 702
  • 8
  • 29