Skip to content

Instantly share code, notes, and snippets.

@OmgImAlexis
Created November 10, 2015 13:13
Show Gist options
  • Save OmgImAlexis/b7ca8f5407e3c5579396 to your computer and use it in GitHub Desktop.
Save OmgImAlexis/b7ca8f5407e3c5579396 to your computer and use it in GitHub Desktop.
Alias to make a github repo and push init commit
alias make-github-repo='curl -u "OmgImAlexis:$(PERSONAL_ACCESS_TOKEN)" https://api.github.com/user/repos -d '\''{"name":"'\''$(basename $PWD)'\''"}'\'' && echo "# $(basename $PWD)" >> README.md && git init && git add README.md && git commit -m "init" && git remote add origin "git@github.com:OmgImAlexis/$(basename $PWD).git" && git push -u origin master'
@OmgImAlexis
Copy link
Author

Just replace $(PERSONAL_ACCESS_TOKEN) with your Github access token, you'll need public access to repos enabled for it and then drop this in your .bashrc or .zshrc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment