Author: Kyle Fuller <kyle@mentallyfriendly.com> 2013-01-28 16:40:10 +0000 +0000
Committer: Kyle Fuller <kyle@mentallyfriendly.com> 2013-01-28 16:40:10 +0000 +0000
Commit: a3500bc28ba214f84d166df43b4a97c60151df27
Parent: 39afef85e4db4c156717e48285a8ffd62bcd48ec
Add a shell function to get the git version
diff --git a/.rc b/.rc
index f3ac402451fccdb0b8ef2b12dd44a73609f75c4b..2c894433382d58166f23cfe2c5895105e77eea32 100644
--- a/.rc
+++ b/.rc
@@ -47,3 +47,8 @@ # Source a local .profile if it exists
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
export PATH=/usr/local/bin:/usr/local/share/python:$PATH
+
+version() {
+ COMMITS=$(git rev-list HEAD | wc -l)
+ echo "$(git describe --tags --always --dirty) ($((COMMITS)))"
+}