Azure website and Git commit id

Is there a way to find the id of the commit used in an automated git deployment to an Azure website?

Particularly, after that deployment has been swapped in to another deployment slot (which is NOT configured for auto-git deployment).

  • Visual Studio Online isn't deploying .js files from TypeScript compilation to Azure
  • Deploy Orchard.Source to Azure via GIT
  • How can I only publish a subfolder to my Azure Website?
  • How can I automatically push code to Azure WebSites when I push to my BitBucket GIT Repository?
  • Continuous Deployment of VSTS app with Git submodules fails on Azure
  • How to set build type(Release/Debug) for Continuous deployment using GIT in Azure App Service
  • EDIT: Preferably a programmatic way, but visible in either portal would be a good start.

  • create a composer package on packigist with bitbucket
  • Restore Git History / Repo From Local .git Folder
  • Git push: change on a branch doesn't always trigger Jenkins to run
  • Clone submodule into directory
  • Reduce increasing time to push a subtree
  • why git svn clone failed when using cygwin?
  • 2 Solutions collect form web for “Azure website and Git commit id”

    sending a request to

    should get you an array of objects that look like this

      "author":"FistName LastName",
      "message":"Site updated: 2015-02-12 00:00:00",

    with "id" being the commit id that was used for a deployment.

    If you didn’t want to call the API, you could do this with a Post Deployment Action Hook.

    running a commit like this will get you the hash:

    git log -1 | sed -n '/commit/p'

    You will need to figure out how you’d want to store it in order to access it. Options include environment variable or text file.

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