This is lazy programmer request. I would like to create a shell script automate the following process:
git clone <remote-repo-url>
cd <cloned-folder>
open <cloned-folder>
So the idea here is to clone a URL and then immediately cd
into the cloned-folder
. The trick here is to identify the cloned-folder
from the url pattern.
For now we can assume that url structure is in this pattern .../<cloned-folder>.git
i.e. the url.
I am wondering if we can actually do with using awk
or some tools like that. The part i am stuck is finding a appropriate regex
, I guess.
USE CASE: Here the use case is if you clone a url, you want to be in the repofolder as soon as possible. The is the pre-requirement if you want to run any git
command like git log
or mate .
which we do 99% of the time.
Thanks in advance.