1

I want to add the git commit id number into a project header file using only MSVS 2015 tools.

At the moment it is implemented with an executable running on pre-build that looks for .git directory and finds the appropriate file with a commit id number. It works fine but I want to use git worktrees because I have to work with multiple branches the same time and I don't really want to have multiple cloned repositories.

Is there a way to use MSVS 2015 tools to reach this goal?

Alex
  • 9,891
  • 11
  • 53
  • 87
  • What do you mean by "revision number"? The git commit id? – Leon Mar 05 '17 at 09:20
  • @Leon exactly commit id. – Alex Mar 05 '17 at 10:31
  • It's very unlikely that MSVS 2015 supports worktrees. I'd recommend running git commandline from the project. As far as I understand you can put its output to project variable like described [here](http://stackoverflow.com/a/16804205/2303202) – max630 Mar 06 '17 at 06:46

0 Answers0