- Init the local git:
cd existing_folder/
git init
- Default branch is master! We need to change it!
git branch -m main
- Create a remote repo:
gh repo create project-name -d "Description for project-name" --public
- Update the changes when created the new repo:
git checkout main
git pull
- Edit files, add, commit and upload to github:
git add .
git commit -m "Commit description"
git push