title: A better way to do git clone
body: <p>This is lazy programmer request. I would like to create a shell script automate the following process: </p>
  
  <pre><code>git clone &lt;remote-repo-url&gt;
  cd &lt;cloned-folder&gt;
  open &lt;cloned-folder&gt; 
  </code></pre>
  
  <p>So the idea here is to clone a URL and then immediately <code>cd</code> into the <code>cloned-folder</code>. The trick here is to identify the <code>cloned-folder</code> from the url pattern. </p>
  
  <p>For now we can assume that url structure is in this pattern <code>.../&lt;cloned-folder&gt;.git</code> i.e. the url.</p>
  
  <p>I am wondering if we can actually do with using <code>awk</code> or some tools like that. The part i am stuck is finding a appropriate <code>regex</code>, I guess.</p>
  
  <p><strong>USE CASE</strong>: 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 <code>git</code> command like <code>git log</code> or <code>mate .</code> which we do 99% of the time.</p>
  
  <p>Thanks in advance.</p>