mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +02:00
175 lines
4.9 KiB
HTML
175 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<meta name="HandheldFriendly" content="True">
|
|
<meta name="MobileOptimized" content="320">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
<meta name="description" content="Eat, sleep, code, repeat.">
|
|
|
|
<base href="http://localhost:1313/">
|
|
<title>
|
|
|
|
|
|
Use @ instead of HEAD
|
|
|
|
</title>
|
|
<link rel="canonical" href="http://localhost:1313/posts/use-at-instead-of-head/">
|
|
|
|
|
|
<script type="text/javascript">
|
|
var baseUrl = 'http:\/\/localhost:1313\/';
|
|
var host = baseUrl.substring(0, baseUrl.length - 1).replace(/\//g, '');
|
|
if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
|
|
window.location.protocol = 'https:';
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="http://localhost:1313/css/reset.css">
|
|
<link rel="stylesheet" href="http://localhost:1313/css/pygments.css">
|
|
<link rel="stylesheet" href="http://localhost:1313/css/main.css">
|
|
|
|
<link rel="stylesheet" href="http://localhost:1313/css/proximanova.css">
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon"
|
|
|
|
href="http://localhost:1313/img/leaf.ico"
|
|
|
|
>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body lang="en">
|
|
|
|
<div class="section header narrow">
|
|
<div class="container">
|
|
<div class="content">
|
|
<nav>
|
|
<ul>
|
|
<a href="http://localhost:1313/posts/"><li>Posts</li></a>
|
|
<a href="http://localhost:1313/about/"><li>About</li></a>
|
|
<a href="http://localhost:1313/code/"><li>Code</li></a>
|
|
|
|
</ul>
|
|
</nav>
|
|
<a href="http://localhost:1313/"><div class="name">Nishanth Shanmugham</div></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section icons narrow">
|
|
<div class="container">
|
|
<div class="content">
|
|
|
|
|
|
<a href="//github.com/nishanths" target="_blank">
|
|
<i class="icon ion-social-github"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="//twitter.com/nshanmugham" target="_blank">
|
|
<i class="icon ion-social-twitter"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="//linkedin.com/in/nshanmugham" target="_blank">
|
|
<i class="icon ion-social-linkedin"></i>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="mailto:nishanths@utexas.edu">
|
|
<i class="icon ion-ios-email larger"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="section main post">
|
|
<div class="container">
|
|
<div class="content">
|
|
<div class="front-matter">
|
|
<div class="title-container">
|
|
<div class="page-heading">
|
|
<a href="http://localhost:1313/posts/use-at-instead-of-head/">Use @ instead of HEAD</a>
|
|
</div>
|
|
<div class="initials"><a href="http://localhost:1313/">ns</a></div>
|
|
</div>
|
|
<div class="meta">
|
|
<div class="date" title="Tue Aug 25 2015 17:09:14 CDT">Aug 25, 2015</div>
|
|
<div class="reading-time"><div class="middot"></div>1 minute read</div>
|
|
</div>
|
|
</div>
|
|
<div class="markdown">
|
|
<p>I recently discovered that from git version <a href="https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.5.txt#L100">1.8.5</a> onwards, <code>@</code> can replace <code>HEAD</code>:</p>
|
|
|
|
<p><div class="highlight"><pre><span class="nv">$ </span>git reset --hard @~2
|
|
<span class="nv">$ </span>git rebase -i @~10
|
|
<span class="nv">$ </span>git diff @~2..@~3
|
|
</pre></div>
|
|
</p>
|
|
|
|
<p>And also in most scenarios <code>HEAD</code> can be left out completely, so you can say:</p>
|
|
|
|
<p><div class="highlight"><pre><span class="nv">$ </span>git reset -- @<span class="o">{</span>2<span class="o">}</span>
|
|
</pre></div>
|
|
</p>
|
|
|
|
<p>instead of:</p>
|
|
|
|
<p><div class="highlight"><pre><span class="nv">$ </span>git reset -- HEAD@<span class="o">{</span>2<span class="o">}</span>
|
|
</pre></div>
|
|
</p>
|
|
|
|
<p>It takes some getting used to, but it’s definitely faster than typing <code>HEAD</code>.</p>
|
|
|
|
<br>
|
|
<p><a href="http://localhost:1313/posts/">Back to posts</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
|
</script>
|
|
<script type="text/javascript">
|
|
try {
|
|
var pageTracker = _gat._getTracker("UA-61427501-2");
|
|
pageTracker._trackPageview();
|
|
} catch(err) {}
|
|
</script>
|
|
|
|
|
|
|
|
<script>document.write('<script src="http://'
|
|
+ (location.host || 'localhost').split(':')[0]
|
|
+ ':1313/livereload.js?mindelay=10"></'
|
|
+ 'script>')</script></body>
|
|
</html>
|
|
|