mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46:41 +02:00

- Change color from orange to blue; improve colors elsewhere - Change `div.section` to `section` - Rename `posts` directory to `blog` - Add ability to specify extra CSS files in `config.toml` - Removed `WebFontsFile` feature from `config.toml` - Remove the initials displayed on top right of single post pages - Update example site
30 lines
689 B
Markdown
30 lines
689 B
Markdown
+++
|
|
date = "2015-08-25T17:09:14-05:00"
|
|
draft = false
|
|
title = "Use @ instead of HEAD"
|
|
slug = 'use-at-instead-of-head'
|
|
|
|
+++
|
|
|
|
I recently discovered that from git version [1.8.5](https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.5.txt#L100) onwards, `@` can replace `HEAD`:
|
|
|
|
{{< highlight bash >}}
|
|
$ git reset --hard @~2
|
|
$ git rebase -i @~10
|
|
$ git diff @~2..@~3
|
|
{{</highlight>}}
|
|
|
|
And also in most scenarios `HEAD` can be left out completely, so you can say:
|
|
|
|
{{< highlight bash >}}
|
|
$ git reset -- @{2}
|
|
{{</highlight>}}
|
|
|
|
instead of:
|
|
|
|
{{< highlight bash >}}
|
|
$ git reset -- HEAD@{2}
|
|
{{</highlight>}}
|
|
|
|
It takes some getting used to, but it's definitely faster than typing `HEAD`.
|