Created
April 25, 2012 18:51
-
-
Save mrmans0n/2492210 to your computer and use it in GitHub Desktop.
Obtain some cool information about git from a Rails application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_BRANCH = `git status | sed -n 1p`.split(" ").last | |
GIT_COMMIT = `git log | sed -n 1p`.split(" ").last | |
GIT_REVISION = `git log --pretty=format:'%h' -n 1` | |
GIT_LASTUPDATE = `git log -1 | sed -n 3p`.split(" ").slice(1,5).join(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment