Created
December 17, 2018 20:29
-
-
Save fharper/d80d8d12efd1ebb5160e63bb15bcf50e to your computer and use it in GitHub Desktop.
CD into newly cloned folder automatically #lazyfred
This file contains 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
git() | |
{ | |
if [ "$1" = clone ] ; then | |
/usr/bin/git "$@" && cd $(basename $_ .git) | |
echo 'Changing directory to repo folder...' | |
else | |
/usr/bin/git "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Won't work on commands like git clone
https://github.com/XXX/XXX.git ~/x
, but I didn't have time to fix