List of git commands: https://www.digitalocean.com/community/tutorials/how-to-push-an-existing-project-to-github
git init
git add -A
git commit -m 'Added my project'
git remote add origin [email protected]:sammy/my-new-project.git
git push -u -f origin main
- Initialised repo
- -A = All files
- -m = message
- git remote add origin is instructing git to add the URL of the default remote server for this repo
- -u (or --set-upstream) flag sets the remote origin as the upstream reference. This allows you to later perform git push and git pull commands without having to specify an origin since we always want GitHub in this case.
- -f (or --force) flag stands for force.