比如一个 xx.config 文件,我自己本地修改了,只适合我自己,不想提交修改,可以做我自己的忽略吗
比如一个 xx.config 文件,我自己本地修改了,只适合我自己,不想提交修改,可以做我自己的忽略吗
|
sbwOct 16, 2020
1
.gitignore 呀
|
|
2
gitignore 对大家都会生效了
|
|
QingXuJiaZhiOct 16, 2020
3
不提交 gitignore ?
|
|
4
1. user / global scope gitignore
2. .git/info/exclude |
|
5
如果对项目有话语权,最好还是拆分 config 文件,一份公共 config,一份私有 config 。
|
|
lululauOct 16, 2020
6
前提是你必须先从 git 仓库中删除这个文件
|
|
8
git update-index --assume-unchanged yourfile.txt
|
|
9
可以用 git assume unchanged,这种对于尤其配置文件来说是最好的。
|
|
10
使用 IDEA 全家桶的 Git 工具,可以选择每个文件的每个修改是否提交
|
|
11
|
|
QingStoneOct 16, 2020 via iPhone
13
?还有人不会选择性提交?都是 git add * ?
|
|
clfOct 16, 2020
14
git add 的时候不要 add 进去就可以了。
|
|
zero469Oct 16, 2020
15
你不 add 不就行了。。。。
|
|
zpf124Oct 16, 2020
17
git update-index --assume-unchanged xxx.txt
|
|
neptunoOct 16, 2020
18
如果是 idea,可以加一个 change list,每次只会提交 default changelist
|