Last active
March 6, 2023 10:48
-
-
Save VeikkoLehmuskorpi/670a0630cee3ed6e38a7a4a3c0dae1e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| # Checkout a local branch with fzf | |
| branch=$(git for-each-ref refs/heads --format='%(refname:short)'|fzf) | |
| if [ -n "$branch" ]; then | |
| git checkout "$branch" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment