title: how to include git commit-number into a c++ executable?
body: <p>i use git as a version tracker for my c++ project. </p>
  
  <p>sometimes i need to repeat a calculation and i would like to know which version of the program i used.</p>
  
  <p>what would be a good way to put a # of the commit into the main executable? in other words. i'd like the program to tell me the # of the current commit in an introductory message as i run the program.</p>
  
  <p>one way i can think of is to make the c++ program lunch "git log" from shell and extract the commit # but i'm not sure how to do it during make.</p>
  
  <p>(I use linux)</p>