Last active
December 19, 2015 22:18
-
-
Save natchiketa/6026183 to your computer and use it in GitHub Desktop.
Bash function to do a `git clone` and `cd` into the directory. Requires Node, but could be refactored to use easily use pure Bash instead. I put it in my `.bashrc`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gcd() { | |
| REPONAME=$(node -e "console.log(process.argv[1].match(/.*?\/([a-zA-Z0-9\-]+).git/)[1]);" $1) | |
| git clone $1 && cd "${REPONAME}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment