quickly copy the branch name of the current project
npx bcy
# or
npm i -g bcy
bcybcy
当前分支:feature/bcybranch=$(git branch --show-current);
echo "当前分支:$branch";
echo $branch | tr -d "\n" | pbcopyon 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'" >> ~/.zshrcthen you can use bcy command