2023-05-06 02:24:23 +02:00
|
|
|
# Mostrar rama actual en directorios de git
|
|
|
|
|
2023-05-25 11:24:33 +02:00
|
|
|
function get_branch {
|
|
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
|
|
|
|
if [[ ! -z ${BRANCH} ]]; then
|
|
|
|
print "${BRANCH}"
|
|
|
|
fi
|
2023-05-06 02:24:23 +02:00
|
|
|
|
2023-05-25 11:24:33 +02:00
|
|
|
unset BRANCH
|
2023-05-06 02:24:23 +02:00
|
|
|
}
|