When I worked with cvs and Subversion I remember a feature where we put some notes in the files and every time we did a commit that data was updated. In general the data referred to the date, author and commit number. It was something like the example below
/*
* $Author: joazinho $
* $Rev: 153 $
* $LastChangedDate: 2016-04-15 17:32:15 -0300 (Fri, 15 Apr 2016) $
*/
In Git something similar for me to get the branch / tag, hash or etc ... that is native.