Skip to content

Instantly share code, notes, and snippets.

@VladRez
Last active May 9, 2019 18:53
Show Gist options
  • Save VladRez/c945637c8646627c360851dbf303231d to your computer and use it in GitHub Desktop.
Save VladRez/c945637c8646627c360851dbf303231d to your computer and use it in GitHub Desktop.
#!/bin/bash
curl -u "$1" https://api.github.com/user/repos -d "{\"name\":\"$2\"}"
git init
git remote add origin "https://github.com/$1/$2.git"
touch README.md
echo 'cli-push-remote-repo.sh' >> .gitignore
echo '.gitignore' >> .gitignore
git add --all
git commit -m "initial commit"
git push --set-upstream origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment