shell获取分支名的两个方式
now_branch_name=git symbolic-ref --short -q HEAD
echo "$now_branch_name"
now_branch_name=git rev-parse --abbrev-ref HEAD
echo "$now_branch_name"
shell获取分支名的两个方式
now_branch_name=git symbolic-ref --short -q HEAD
echo "$now_branch_name"
now_branch_name=git rev-parse --abbrev-ref HEAD
echo "$now_branch_name"