I am very new with git so maybe this is a newbie question. I have a React project that I want to upload to GitHub, I already have my token and I've used Github-ClI in order to set up my account, so far I though everything worked just fine. I created a repository on my Github account, then using the Terminal I go to my project's folder and I try to upload it, at first I got an error: "origin already exists" so I remove such origin, and I try again, indeed something gets uploaded in my Github, but not that project, but the first project that I uploaded from the console when I first configured my token using Gihub-CLI. So the question is: How do I change that? How can I make it so the project that I want gets uploaded?
I am using Debian (Wsl) I've created my React app using npx create-react-app
Here the list of commands that I've used:
git remote add origin https://github.com/*****/******.git
git branch -M main
git push -u origin main
First I got
error: remote origin already exists.
Then I do:
git remote remove origin
then again :
git remote add origin https://github.com/******/******.git
git branch -M main
git push -u origin main
Here I don't get any error, just that another Project gets uploaded like I already said