Created
January 4, 2022 16:43
-
-
Save madagra/346b6fc7f6b05cc6d9a28a397be81299 to your computer and use it in GitHub Desktop.
Select commits for cherry-picking
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
#!/bin/bash | |
# select a list of commits starting from head and put the in a file | |
# this is useful when selecting a set of commits to cherry-pick | |
git log --oneline | head -25 | tac | awk '{print $1}' | sed ':label1 ; N ; $! b label1 ; s/\n/\ /g' > commits.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment