Last active
October 13, 2019 13:42
-
-
Save gidgid/e8d865376b035d40529738a47bfc95c1 to your computer and use it in GitHub Desktop.
Showing Git checkout by regex
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
[alias] | |
# checkouts | |
## "checkout regex" - more or less checkout branches by regex | |
cor = "!checkout_by_regex() { git checkout $(git branch | grep -e \"$1\" | head -n1); }; checkout_by_regex" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment