Skip to content

Instantly share code, notes, and snippets.

@svdmitrij
Created August 21, 2013 09:13
Show Gist options
  • Save svdmitrij/6292146 to your computer and use it in GitHub Desktop.
Save svdmitrij/6292146 to your computer and use it in GitHub Desktop.
Cherry pick commit from other repository
#!/bin/bash
dir=$1
sha=$2
if [[ -z $dir || -z $sha ]]
then
echo "Usage: $0 otherRepoDir commitSha"
exit 1
fi
git --git-dir=$dir/.git format-patch -k -1 --stdout $sha | git am -3 -k
@svdmitrij
Copy link
Author

Cherry-pick from other repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment