Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shell script get branch name

#!/bin/bash

branch=$(git symbolic-ref --short HEAD)

echo
echo "**** Running post-commit hook from branch $branch"
echo
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #shell #script #branch
ADD COMMENT
Topic
Name
1+4 =