create new repo from cli code example
Example 1: create new repo cli
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
Example 2: create a repository git terminal
git init
git add somefile
git commit -m "initial commit"
git remote add origin https://github.com/username/new_repo
git push -u origin master
# New local repository
git init
git add .
git commit -m "Initial commit"
# New remote repository
# Create remote repository (likely on github), then:
git remote add origin https://github.com/username/new_repo #https
git remote add origin git@github.com:username/new_repo #ssh
# Now push
git push -u origin master
Example 3: how to add a repository to github
git & github