Last Updated: February 25, 2016
·
1.429K
· shrayas

A quicker Mkdir and git init

Idea borrowed from @xtagon:

function mdgit() {
    mkdir -pv $1 && cd $1 && git init
}

Create a directory and initialize a blank git repo within it

1 Response
Add your response

Same as

function mdgit() {
    git init $1 && cd $1
}

For me it is more straightforward to run git init a/be/repo and cd !$ without extra command

over 1 year ago ·