Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created December 17, 2018 21:54
Show Gist options
  • Save jcoglan/125b55adba55198d18767c092c95af22 to your computer and use it in GitHub Desktop.
Save jcoglan/125b55adba55198d18767c092c95af22 to your computer and use it in GitHub Desktop.

Revisions

  1. jcoglan revised this gist Dec 17, 2018. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion git-log-times.sh
    Original file line number Diff line number Diff line change
    @@ -21,4 +21,6 @@ export GIT_COMMITTER_DATE="1500000000"
    seq 1 7 | while read n ; do
    echo "$n" > file.txt
    git commit -am "topic-$n"
    done
    done

    git log --oneline topic..master
  2. jcoglan created this gist Dec 17, 2018.
    24 changes: 24 additions & 0 deletions git-log-times.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    #!/bin/bash

    cd ~/src
    dir="git-long-uninteresting-branch"

    git init $dir > /dev/null
    cd $dir

    export GIT_COMMITTER_DATE="1600000000"

    seq 1 3 | while read n ; do
    echo "$n" > file.txt
    git add .
    git commit -m "master-$n"
    done

    git checkout -b topic master^

    export GIT_COMMITTER_DATE="1500000000"

    seq 1 7 | while read n ; do
    echo "$n" > file.txt
    git commit -am "topic-$n"
    done