1
0
Fork 0

Adding current_branch function, which can be used like: git pull origin master

pull/1/merge
Robby Russell 15 years ago
parent b549dd4999
commit 473dd3b212

@ -12,3 +12,11 @@ parse_git_dirty () {
fi fi
} }
#
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
#
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}

Loading…
Cancel
Save