Skip to content

Instantly share code, notes, and snippets.

@efatsi
Last active January 4, 2016 10:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save efatsi/58566bcc900d50e42d49 to your computer and use it in GitHub Desktop.
Save efatsi/58566bcc900d50e42d49 to your computer and use it in GitHub Desktop.
github-create() {
if [ $1 ]
then
repo_name=$1
else
echo "Repo name?"
read repo_name
fi
curl -u 'efatsi:MY_PERSONAL_ACCESS_TOKEN' https://api.github.com/user/repos -d '{"name":"'$repo_name'"}'
git remote add origin git@github.com:efatsi/$repo_name.git
git push -u origin master
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment