aspe:keyoxide.org:O6EPBCN4MXZQBGKHCP5QA3S53Q
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/bash | |
[ $# != 1 ] && echo "expects exactly one arg" && exit 1 | |
if branch_name=$(git symbolic-ref --short -q HEAD) ; then | |
new_end="$1" | |
branch_name="${branch_name%/*}/$new_end" | |
git checkout -b "$branch_name" | |
else | |
echo "not on any branch" && exit 1 |
OlderNewer