Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get current git branch without using `git` command
cat .git/HEAD | cut -c17-9999

Useful if you are in docker and dont want to install git in your container :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment