Skip to content

Instantly share code, notes, and snippets.

@carlos-ch
Last active April 23, 2021 13:04
Show Gist options
  • Save carlos-ch/801d33adf913eb6c02042f8f19fba907 to your computer and use it in GitHub Desktop.
Save carlos-ch/801d33adf913eb6c02042f8f19fba907 to your computer and use it in GitHub Desktop.
After creating a repo on GH:

Create a new repository on the command line

echo "# <app-name>" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:<username>/<repo>.git //<-- using SSH key
git push -u origin main

…or push an existing repository from the command line

git remote add origin git@github.com:<username>/<repo>.git //<-- using SSH key
git branch -M main
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment