- how to create and init a git repository
- how to create and init a git repository for an organization
Last active
September 2, 2015 08:27
-
-
Save andineck/fa1931fd2ba7ef12029d to your computer and use it in GitHub Desktop.
github: add repo via command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create and init a git repository for an organization | |
# replace: USER, ORG, PASSWORD, REPO in this script | |
# cd into your development directory | |
# with a user repo | |
curl -u USER:PASSWORD https://api.github.com/user/repos -d '{"name":"REPO"}' | |
mkdir REPO && cd REPO | |
git init | |
touch readme.md | |
git add . | |
git commit -m initial | |
git remote add origin https://github.com/USER/REPO.git | |
git push -u origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create and init a git repository for an organization | |
# replace: USER, ORG, PASSWORD, REPO in this script | |
# cd into your development directory | |
# org repo | |
curl -u USER:PASSWORD https://api.github.com/orgs/ORG/repos -d '{"name":"REPO"}' | |
mkdir REPO && cd REPO | |
git init | |
touch readme.md | |
git add . | |
git commit -m initial | |
git remote add origin https://github.com/ORG/REPO.git | |
git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment