Skip to content

Instantly share code, notes, and snippets.

@mamut
mamut / git-patchmaker.sh
Last active December 21, 2015 17:58
`./git-patchmaker.sh 123456` will `git cherry-pick` all commits from master related to pivotal ticket #123456 to a stage branch
#!/bin/bash
set -e
pivotal_ticket_id=$1
function commits_from_master() {
git checkout master > /dev/null 2>&1
git log --reverse --oneline --no-abbrev-commit --grep $1 | cut -d ' ' -f 1
}