unixorn/git-extra-commands

View on GitHub
bin/git-branch-name

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Copy the current branch name to stdout for use in automation

branch=$(git rev-parse --abbrev-ref HEAD)

echo "$branch" | tr -d '\n' | tr -d ' '