Git Cheatsheet
Initialize a New Repository¶
Init Git¶
git init
git add .
git commit -m "Initial Commit"
Push to Github¶
gh auth login
gh repo create REPO-NAME --public --source=. --remote=origin --push
Without gh, create the repository on Github website, and connect local to remote:
git remote add origin git@github.com:USERNAME/REPO-NAME.git
git branch -M main
git push -u origin main