johnhamelink
4/22/2013 - 1:40 PM

Export git repositories in one command with ZSH

Export git repositories in one command with ZSH

# Export git repositories in one command with ZSH
# Requires the git repo url and the desired folder to output the repo to
# Example: git-export https://github.com/toddmotto/html5blank.git html5blank
git-export() {
    git clone --depth=1 "$@"
    rm -rf "$2"/.git
}