Whether you are writing a fancy database, or simple CLI program, it's always helpful to embed git commit into the binary. With it, you can know which exact lines of code is to be blamed when users throw you an unhappy backtrace. Previously I have done similar thing in Go, and it's fairly easy: 1 go build -ldflags="-X main.Commit=$(git rev-parse HEAD)" And in you main.go, you have something like