Skip to content

Instantly share code, notes, and snippets.

View st3v's full-sized avatar

Stev Witzel st3v

View GitHub Profile
@st3v
st3v / commit_authors.sh
Created February 1, 2013 07:28
Manipulate committer/author for historic git commits
# set author/committer for ALL commits in the history
git filter-branch --env-filter '
export GIT_AUTHOR_NAME=new_name
export GIT_AUTHOR_EMAIL=new@foo.bar
export GIT_COMMITTER_NAME=new_name
export GIT_COMMITTER_EMAIL=new@foo.bar'
# change author/committer for all commits from a particular individual
@st3v
st3v / commit_dates.sh
Last active March 31, 2021 01:54
Manipulate Git Commit Dates
# Setting date at commit time:
GIT_COMMITTER_DATE="Tue Feb 7 22:47:34 2012 -0800" git commit -m "Ignore stuff" --date "Tue Feb 7 22:47:34 2012 -0800"
# Changing date for historical commit:
git filter-branch --env-filter 'if [ $GIT_COMMIT = <commit-id> ]
then
export GIT_AUTHOR_DATE="Tue Feb 7 22:47:34 2012 -0800"
export GIT_COMMITTER_DATE="Tue Feb 7 22:47:34 2012 -0800"
@st3v
st3v / Dummy.scala
Created December 18, 2012 21:14
lift - parse, extract, and find
import org.scalatest.FunSuite
import net.liftweb.json._
class Dummy extends FunSuite {
private implicit val formats = net.liftweb.json.DefaultFormats
private def data =
"""[
{
"id": "1234",