I am editing a project with git on multiple computers. How do I check the current version I am running on a computer?
For example, each time I commit, I use a version number and include it in the commit message. Is there a way for me to retrieve the current commit message for the working copy I am using?
Git does not have a concept of a “Revision Number”. It has a commit hash. You won’t know your commit hash until you’ve actually commited, so you cannot get the “current hash”.
If you want the commit hash of the previous commit, use
git log -1. If you need the output to be just the hash, then xpapad’s answer is what you are looking for.If you mean the actual version of Git (your question was a little ambiguous to me), then use
git version.