Skip to content

Instantly share code, notes, and snippets.

@felipecabargas
Last active January 10, 2016 02:00
Show Gist options
  • Save felipecabargas/fbfa859d493a988c252e to your computer and use it in GitHub Desktop.
Save felipecabargas/fbfa859d493a988c252e to your computer and use it in GitHub Desktop.
Bash function for easier GitHub repository cloning
function ghc() {
git clone https://github.com/$1.git
}

ghc

just another alias for HTTPS cloning!

GHC is a simple bash function that allows replacing this:

git clone https://github.com/user/repository.git

for this:

ghc user/repository

Dead simple, dead useful for command replications in different systems.

In order to add it to your system:

  • Copy it and paste-it to your .bashrc/.bashprofile/.zshrc/etc
  • Run source ~/.bashrc (you understand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment