Skip to content

Instantly share code, notes, and snippets.

@itsananderson
Last active August 29, 2015 13:58
Show Gist options
  • Save itsananderson/10351856 to your computer and use it in GitHub Desktop.
Save itsananderson/10351856 to your computer and use it in GitHub Desktop.
Add a "git hub" alias that clones from a username/repo argument
# Usage:
#
# git hub itsananderson/web-server
# git hub itsananderson/web-server other-folder
#
# Let me know if there's a better way of doing this
# http://twitter.com/itsananderson
git config --global alias.hub \!"sh -c 'git clone git@github.com:\$1.git \${@:2}' -"
@timothyekl
Copy link

Do you want that second example line to read git hub ... instead of get hub ...?

@itsananderson
Copy link
Author

Derp. Thanks

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