Autostrada
Autostrada
Create a new codebase Get Autostrada Plus
Documentation Changelog Roadmap Give feedback
Login

DocumentationTraditional web application › Git integration

Git integration

If you select the Git integration option, a .gitignore file will be included containing appropriate values for the generated codebase, and the internal/version package will return a version number based on your Git metadata.

The Get() function in internal/version will return the latest Git tag (e.g. v1.2.3). If no Git tag is available, it will return a pseudo-version made up of the latest commit time and hash (e.g. v0.0.0-20250219190134-59bdb76fda0c).

Alternatively, you can retrieve the latest Git commit hash only by calling the GetRevision() function.

If the codebase contains uncommitted changes, both the Get() and GetRevision() functions will return a value with a +dirty suffix, like v0.0.0-20260517085446-b9cf41efa303+dirty.

Important: For the Get() and GetRevision() functions to work correctly, you must have a local Git repository initialized and the application must be built using go build, or run using the make run or make run/live commands from the admin makefile. If you run the application using go run or without a local Git repository, both functions will return either "(devel)" or "unavailable".