Skip to content

Instantly share code, notes, and snippets.

@MichaelBlume
MichaelBlume / gitconfig
Created April 12, 2011 17:51
my git config file
[advice]
# I know this stuff by now
pushNonFastForward = false
statusHints = false
[alias]
a = add
ai = add --interactive
ap = add --patch
b = branch
bl = blame
@MichaelBlume
MichaelBlume / git-aliases.bash
Created April 11, 2011 18:34
Some git-svn workflow stuff from my .bash_aliases, before our office switched to git and I switched to .gitconfig
alias g="git"
alias com="g commit"
alias add="g add"
alias dif="g diff"
alias res="g reset"
alias co="g checkout"
alias branch="g branch"
alias merge="g merge"
alias st="g status"
@MichaelBlume
MichaelBlume / Lose SVN IDs
Created April 10, 2011 23:58
Strip off the SVN IDs appended by the git-svn-clone command
git filter-branch --msg-filter 'sed -e "/^git-svn-id:/d" ' -- --all
@MichaelBlume
MichaelBlume / comitter rename
Created April 10, 2011 23:57
rename a comitter (works with AUTHOR in place of COMITTER, of course)
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "name" ];
then
GIT_COMMITTER_NAME="New Name";
GIT_COMMITTER_EMAIL="new@email.com.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' -- --all
@MichaelBlume
MichaelBlume / Orphan a Commit
Created April 10, 2011 23:54
Script for orphaning a single commit. Useful in conjunction with .git/info/grafts
git filter-branch -f --parent-filter '
if [ "$GIT_COMMIT" = "SHA_GOES_HERE" ];
then
echo ''
else
read parents;
echo $parents;
fi' -- --all
@MichaelBlume
MichaelBlume / abkiller.user.js
Created April 9, 2011 05:55
kills the action bar on okcupid profiles
// ==UserScript==
// @name ABKiller
// @namespace http://www.github.com/MichaelBlume/
// @description Kill the action bar on OKCupid profiles
// @include http://www.okcupid.com/profile/*
// @include http://okcupid.com/profile/*
// ==/UserScript==
var action_bar = document.getElementById('action_bar');
action_bar.parentNode.removeChild(action_bar);