Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add your current Git SHA to your Rails app response headers

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 sasha.gemspec


Add your current Git SHA to your Rails or Sinatra app response headers.


That you use git to track your source code


Rails 3

Add it to your Gemfile, you are using bundler, right?

gem 'sasha'

Rails 2

Install the gem:

gem install sasha

Add to bottom of environment.rb:

require 'sasha'


Require it on after sinatra/base

require 'sinatra/base'
require 'sasha'

Test it

$ curl -I | grep X-Git-Sha

Your should see something like

    X-Git-Sha: ae4822ddfdfbb27cddcc30b718d6f9bc99138044

About the Author

Crowd Interactive is an American web design and development company that happens to work in Colima, Mexico. We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit. Find more info here!

Something went wrong with that request. Please try again.