2015-08-26 23:20:13 +08:00
|
|
|
function git_branch_name -d "Get current branch name"
|
|
|
|
git_is_repo; and begin
|
2016-07-23 00:27:38 +08:00
|
|
|
command git symbolic-ref --short HEAD ^/dev/null;
|
|
|
|
or command git show-ref --head -s --abbrev | head -n1 ^/dev/null
|
2015-08-26 23:20:13 +08:00
|
|
|
end
|
|
|
|
end
|