Skip to content

Instantly share code, notes, and snippets.

View naterkane's full-sized avatar

Nater Kane naterkane

View GitHub Profile
@olix0r
olix0r / git-unfuck.sh
Last active August 6, 2018 20:27
git-unfuck
#!/bin/sh
set -e
if ! klist -t 2>/dev/null >&2 ; then
echo ":; :; kinit --keychain"
kinit --keychain
fi
branch=$(git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/\* \(.*\)/\1/')