diff --git a/Makefile b/Makefile
index e084551121b300a5ddfba9ecb26b224b89e3ed81..50f814c9bc56414e079dcd466d069db174c93e86 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ SERVER_OUT := "bin/server"
 PKG := "code.vereign.com/code/key-storage-agent"
 SERVER_PKG_BUILD := "${PKG}"
 PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
-BRANCH := $(shell git show -s --pretty=%d HEAD)
+BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
 COMMIT := $(shell git describe --always --long --dirty)
 VER := $(BRANCH).$(COMMIT)