【发布时间】:2019-07-19 08:36:42
【问题描述】:
我们的开发团队在测试或开发阶段使用不同的 webconfig 设置,如连接字符串等,有时会意外推送这些更改,这会导致大问题。推送后,Jenkins 应用更改,我们浪费了大量时间来查找错误。我们通过 Bitbucket 使用 git 控制系统。如何预防这些问题?
我也尝试过像这样 gitattribute 文件,但之后,新的分支推送仍在合并它。
# Source https://help.github.com/articles/dealing-with-line-endings
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and
converted
# to native line endings on checkout.
---is it necessary to specify?
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.config binary
*.jpg binary
*.ico binary
core.autocrlf=true
【问题讨论】: