Is there a single Git command to get the current tag, branch and commit?
git log is extremely flexible, with lots and lots of options. You might not be able to reproduce the exact output of the three commands above, but you might come close enough to achieve the effect you need. For example: git log –pretty=format:’%ad %h %d’ –abbrev-commit –date=short -1 produces the date, SHA-1 and symbolic references … Read more