Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

francoboy7's avatar

Envoyer and Git Tags

Hi guys

I'm using envoyer and forge to deploy and I use a little php snippet in the footer of my app to read my git tag version. It works locally but not when deploying, I think it's because envoyer is not running a git fetch --all command.

Do you know how I could implement this so that new tags are also pulled in ?

Thank you

0 likes
1 reply
click's avatar

Can't you run the command you need in a deployment hook and do whatever you need to do after that?

What I do is save the branch/tag in a file during deployment. This way it can simply read the file instead of asking git everytime what the status is.

You can do this with envoyer's variables available during deployment:

  • {{ branch }} = current branch or tag name, this one is not listed in the documentation.
  • {{ sha }} = commit hash
  • More > https://envoyer.io/docs

Please or to participate in this conversation.