How do I access my Git tags on Heroku?

I’m running a Python app on Heroku using Gunicorn. I want to display the output of $ git describe for versioning. It seems that none of my Git tags have been pushed to Heroku from my Travis CI deployment.

How do I:

  • (a) push all my Git tags to Heroku from Travis

or

  • (b) fetch all tags from a remote Git repo on Heroku

For (a), I have tried running $ git push --tags --force <...> on Travis, but Travis’ before_deploy clause doesn’t have access to Heroku credentials.

For (b), I have tried running $ git fetch --tags --prune on Heroku but get:

fatal: Not a git repository (or any parent up to mount point /app)

Git Baby is a git and github fan, let's start git clone.