Skip to content

Instantly share code, notes, and snippets.

@pjbelo
Created April 21, 2022 09:17
Show Gist options
  • Save pjbelo/af90247a13d86ad6fbaab6dc6998a608 to your computer and use it in GitHub Desktop.
Save pjbelo/af90247a13d86ad6fbaab6dc6998a608 to your computer and use it in GitHub Desktop.

create a new repository on the command line

echo "# myproject" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin [email protected]:pjbelo/myproject.git
git push -u origin main

push an existing repository from the command line

git remote add origin [email protected]:pjbelo/myproject.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