If you have a repository in your GitHub and want to bring it to your local system
git init
git remote add origin {url}
git pull origin main
check your current branch
git branch
if its not in main run
git checkout -b main
git add .
git commit -m 'initial commit'
git push origin main