Skip to content

Instantly share code, notes, and snippets.

@fharper
Created December 17, 2018 20:29

Revisions

  1. fharper created this gist Dec 17, 2018.
    9 changes: 9 additions & 0 deletions cd-after-git-clone
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    git()
    {
    if [ "$1" = clone ] ; then
    /usr/bin/git "$@" && cd $(basename $_ .git)
    echo 'Changing directory to repo folder...'
    else
    /usr/bin/git "$@"
    fi
    }