Let us assume you have created a project in your local machine
Create new empty repository on github https://github.com/new Please make sure you do not select Initialize this repository with a README checkbox. This is to ensure we dont get error while pushing local changes to github
Create local repository and create required codebase
Push to github
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/XXX-your-username-XXX/XXX-your-repo-name-XXX.git
git push -u origin main
post by Pravin