Answers for "can we store the name of the current branch in a variable in bash"

0

can we store the name of the current branch in a variable in bash

branch_name=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
Posted by: Guest on March-28-2022

Code answers related to "can we store the name of the current branch in a variable in bash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language