Created
September 24, 2015 22:01
-
-
Save cheshire137/4e80b9034e84a0283cf7 to your computer and use it in GitHub Desktop.
Get cherry-pick commands for shas linked on a Github page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Go to a URL like https://github.com/my-org/my-repo/pull/1/commits | |
// 2. Open up your browser JavaScript console. | |
// 3. Paste the command below. | |
// Now you have git cherry-pick commands for making a branch of those commits! | |
var commands = '';jQuery('a.sha').each(function() { var url = $(this).attr('href'); var sha = url.split('/commit/')[1]; commands += 'git cherry-pick ' + sha + "\n"; }); console.log(jQuery.trim(commands)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment