最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I exempt a file from causing the 'dirty' state in `git describe --dirty`? - Stack Overflow

programmeradmin3浏览0评论

In my project, I rely on git describe ... --dirty to produce version info into the source code that gets compiled for a target machine.
This works well enough, except that in many cases, the main project file needs a tiny adjust before compilation to work (changing the machine IP address). This will flag the clone as 'dirty' and append the -dirty suffix to the version info visible in the application.

This behavior is technically correct, but in my case unwanted, as it makes it look like all machines have cowboy-coded changes, though they don't necessarily.

Can I make an exception for a particular file for the -dirty state in GIT?

I do need this file tracked in the repository.

发布评论

评论列表(0)

  1. 暂无评论