Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

check current branch github

git branch
# should show all the local branches of your repo. The starred branch is your current branch.

# If you want to retrieve only the name of the branch you are on, you can do:

git rev-parse --abbrev-ref HEAD
# or with Git 2.22 and above:

git branch --show-current
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #current #branch #github
ADD COMMENT
Topic
Name
8+2 =