Skip to content

Instantly share code, notes, and snippets.

View aigitia's full-sized avatar

Armen Igitian aigitia

View GitHub Profile
@aigitia
aigitia / git-pick-file.sh
Created April 3, 2019 06:07 — forked from jussi-kalliokoski/git-pick-file.sh
Cherry-picks commits from master that have changes to specified files.
$!/usr/bin/env sh
branch=`git symbolic-ref --short HEAD`
git checkout master
commits=`git log --pretty="%H" --reverse -- $*`
git checkout $branch
for commit in $commits; do
git cherry-pick $commit
done