As per discussion with Go team. it's hacky but it works. create tools.go git add tools.go go mod vendor git add vendor go mod tidy go mod vendor # again