"git rev-parse HEAD" is better, you'll get just the commit SHA1 and it doesn't need grep/findstr.