---
title: "Sign Git Revision to Builds to Track Down Issues"
date: 2023-01-04T10:45:44.000Z
author: Z.SHINCHVEN
tags: [git]
canonical: https://atlassc.net/2023/01/04/sign-git-revision-to-builds
---
Write a build script to sign the git revision to the build. 
This way, you can track down the exact git revision that the build is based on.

```bash
## Get Git revision
VERSION=$(git rev-parse HEAD)
## Get date
DATE=$(date)

echo "$VERSION" > ./version.txt
echo "$DATE" >> ./version.txt
```
