We need to be able to access git history (specifically, so we can run git diff between last deployed commit and commit we are about to deploy, since Bamboo doesn't appear to have any way to deploy only changes / remove only removed files). However, it appears that during the deploy stage (and possibly build stage, I'm assuming), the git repo isn't part of the artifact created during build phase.
Even if we could do it on the build step, that wouldn't help much, because we need to get ALL changes between last "release" and current "release" and deploy time, not whatever it was at build time.
We could manually clone the repo someplace during our deployment script, but that is potentially many GB of cloning that isn't unnecessary and will slow down the deploy process when ideally we could have it already in the artifact we're using.
Is there a way from a shell script to access (via variable, or such) wherever the git repo was cloned to so we can run the necessary git commands against it ?