quickly copy the branch name of the current project
npx bcy
# or
npm i -g bcy
bcy
bcy
当前分支:feature/bcy
branch=$(git branch --show-current);
echo "当前分支:$branch";
echo $branch | tr -d "\n" | pbcopy
on Mac You can also use Shell
run the following script
echo "alias bcy='branch=\$(git branch --show-current); echo \"当前分支:\$branch\"; echo \$branch | tr -d \"\\\\n\" | pbcopy'" >> ~/.zshrc
then you can use bcy
command