dotfiles/.config/fish/functions/git_develop_branch.fish

11 lines
307 B
Fish
Raw Normal View History

2024-12-15 22:46:38 +00:00
function git_develop_branch -d 'Detect name of develop branch of current git repository'
command git rev-parse --git-dir &>/dev/null || return
for branch in dev devel development
if command git show-ref -q --verify refs/heads/$branch
echo $branch
return
end
end
echo develop
end