Skip to content

Instantly share code, notes, and snippets.

@cogumm
Last active July 27, 2021 05:41
Show Gist options
  • Save cogumm/c08ed4dc3a92c8f8282d417cc5f5c4a7 to your computer and use it in GitHub Desktop.
Save cogumm/c08ed4dc3a92c8f8282d417cc5f5c4a7 to your computer and use it in GitHub Desktop.

Create a new repository on the command line:

echo "# exemple" >> 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/yourrepository.git
git push -u origin main

Or push an existing repository from the command line:

git remote add origin git@github.com:USERNAME/yourrepository.git
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