recovering a deleted branch using git reflog

So after finishing something on a topic branch called “gamelan”, i wanted to switch back to the master branch, so this is what i just did:

$ git checkout master
$ git branch -D gamelan

Shoot! Now in a i just deleted the branch without merging it beforehand. (Why, but why!?). Fortunatly Git has some divine powers which can help you recover. Git records your changes in a log, which you can show using git reflog:

$ git reflog
bc2ff27 HEAD@{1}: checkout: moving from gamelan to master
2cf094f HEAD@{2}: commit: WIP klangreihe gibt Noten zurück. Thread Beispiele
8592aac HEAD@{3}: commit: WIP mehrere stimmen über gamelan scheduler
...

These commits are still “somewhere out there”. So to merge the changes from the deleted branch, i just merged the last commit from the deleted branch:

$ git merge 2cf094f

Mmmh git.

1 week ago with .
The Zoomable Map on paper

This was posted 1 month ago. It has 0 notes and .

My Bloody Valentine - Cigarette In Your Bed

Cute fan video

This was posted 1 month ago. It has 0 notes and .
Medien Kunst Netz | Ästhetik des Digitalen

Norbert Wiener (erfinder der Kybernetik) am MIT, 1948 | Fotografie | © Norbert Wiener

Großartige Übersicht über rationale Ästhetik, Informationstheorie, Kybernetik etc. von Claudia Giannetti.

This was posted 1 month ago. It has 0 notes and .
A Tool to Deceive and Slaughter (2009) – Caleb Larsen

By Caleb Larsen

via Stories in Digital Media:

eBay auction item which attempts to sell itself via eBay. If you buy it you can put it in your room, connect it to your internet connection and wait until it tries to sell itself again. Interesting postironic concept.

This was posted 1 month ago. It has 0 notes and .
Josef Matthias Hauer - Tropen graphisch, 1948

Josef Matthias Hauer - Tropen graphisch, 1948

This was posted 1 month ago. It has 0 notes and and a high-res version.
New album by Four Tet "There Is Love In You"

There Is Love In You by Four Tet

This was posted 1 month ago. It has 0 notes and .

Josef Matthias Hauer – Der geistige Urheber der Zwölftonmusik

Literatur zum Thema

This was posted 1 month ago. It has 0 notes and .

remove content of <script> elements using Sanitize

Ryan Grove’s Sanitize is a fast and easy to use html scrubber. Here’s my current way to remove not only the <script>element, which is handled by Sanitize, but also all of it’s children. Please let me know, if there is a better way to do it.

UPDATE: rgrove refactored this a teeny bit. thanks!

1 month ago with .
Augmented reality.

Acoustic listening devices developed for the Dutch army as part of air defense systems research between World Wars 1 and 2.

(via but does it float)

Augmented reality.

Acoustic listening devices developed for the Dutch army as part of air defense systems research between World Wars 1 and 2.

(via but does it float)

This was posted 2 months ago. It has 0 notes and .