Skip to content

Instantly share code, notes, and snippets.

@tusharhow
Created August 13, 2022 12:16
Show Gist options
  • Save tusharhow/7143486844acac767e66d8ad6e07d72a to your computer and use it in GitHub Desktop.
Save tusharhow/7143486844acac767e66d8ad6e07d72a to your computer and use it in GitHub Desktop.

Setting up a new Git Repo

##Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:alexpchin/<reponame>.git
git push -u origin master

##Push an existing repository from the command line

git remote add origin git@github.com:alexpchin/<reponame>.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment