Apologize up front as I am super new to React. I run the command npx create-react-app {test-app} and I understand that it creates a git repository for me. My confusion is I don't understand how I connect my github page to that repository. (if that makes sense) connect my newly created GitHub repo page connected to React project Hope this makes sense.
You can create a Github repository. Then copy the link to clone the repository. Next you can head towards the react project folder and open the terminal.
Run
git remote add origin <url_you_copied>.
After that you can do, add commit push operations.
Run the below commands:
git init
git remote add origin <url you copied>
git init initializes a local git repo.
git remote add origin <url you copied> is just what repo to push the code to.
Then, to push a commit:
git add .
git commit -m "commit message"
git push origin main
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With