Skip to content

Instantly share code, notes, and snippets.

View milankarunarathne's full-sized avatar
:octocat:
Coding

Milan Karunarathne milankarunarathne

:octocat:
Coding
View GitHub Profile
@xinan
xinan / git_extract_commits.sh
Last active October 16, 2015 04:10
This is a simple shell script to extract commits by a specified author in a git repository and format them as numbered patches. It is useful for GSoC code submission.
if ! [[ $# -eq 1 || $# -eq 2 || $# -eq 4 ]]; then
echo "Usage: $0 <author> [<start_date> <end_date>] [output_dir]"
echo "Example: $0 xinan@me.com 2015-05-25 2015-08-21 ./patches"
exit
fi
author=$1
if [ $# -gt 3 ]; then
output_dir=$4