How to embed an updated git-hash into Version.hpp?
问题 Original Title: How to make git ignore my file regardless of branching? I have the following post-checkout file which works as expected: #!/usr/bin/ruby cmd = ENV["HOME"] + "/dev/pitbull/cpp/bin/gen_version.rb --write" `#{cmd}` The gen_version.rb script figures out a timestamp, the last master tag, and the HEAD git hash and writes to a VERSION.hpp file which is also in git. I then use use git update-index --assume-unchanged VERSION.hpp to make git ignore my change. Now, this works great if I