💾 Archived View for idiomdrottning.org › git-clone captured on 2024-05-12 at 16:05:23. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

-=-=-=-=-=-=-

git clone yadda.yadda/yadda; cd yadda

I can’t believe there isn’t a flag to git clone to also cd into the newly cloned directory.

If there is please let me know. (Apparently that’s going to be unpossible since the shell is a parent process.)

Writing a shell command for it for now because if I have to type cd obvious-name one more time my hands will fall off.

gitc () { git clone "$1"; cd "`basename "$1" .git`" }

(Thanks to mhd for writing in and suggesting basename from coreutils instead of my home-made path-remover!♥︎)