title: Fetching second-last commit's sha1 in git without cloning
body: <p>I want to fetch the second last commit from a repository without cloning. Currently I am using <code>git ls-remote &lt;repo&gt; &lt;branch&gt; |  cut -c1-7</code>. This helps me to get the latest commit's sha1 without cloning the repository. Can I use this in some way or any other command to fetch the second-last commit?</p>