├── README.md └── git-crawl /README.md: -------------------------------------------------------------------------------- 1 | #git stuff 2 | 3 | ##git crawl 4 | 5 | A shell script that extends the git api allowing one to 'crawl' through their commits. 6 | 7 | ###Setup 8 | 9 | Copy git-crawl to a directory that is accessible by PATH. Make sure the script can be executed by your user (ie - `chmod u+x git-crawl`). 10 | 11 | ###Usage 12 | 13 | 1. Checkout a commit that you want to crawl from 14 | 2. `git crawl ` 15 | 3. repeat 2 until you reach your desired commit 16 | 17 | ###Tip for Crawling Commits Sequentially ('git crawl next', eg) 18 | 19 | 1. `git checkout master~10` to rewind ten commits on master 20 | 2. `git crawl master` moves one step closer 21 | -------------------------------------------------------------------------------- /git-crawl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | USAGE="" 3 | . "$(git --exec-path)/git-sh-setup" 4 | test -n "$*" || usage 5 | 6 | next_commit=$(git rev-list --reverse HEAD..$1 | head -1) 7 | : ${next_commit:=$1} 8 | git checkout $next_commit 9 | --------------------------------------------------------------------------------