我用Matlab写代码,每当修改代码的时候,Matlab会自动缓存.asv文件,我就想用.ignore的方法忽略这些.asv文件。我上网找了一个MATLAB.gitigonore文件(https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore),git add和git commit了这个文件。
但是输入git status之后,仍然显示
Untracked files:
(use "git add <file>..." to include in what will be committed)
mycode.asv
为什么git 还在track这个.asv文件啊?
我输入 git check-ignore -v *
根本没有任何反应
明白了。文件名不能叫MATLAB.gitigonore,而必须叫.gitignore
它的意思是叫你把文件内容加到.gitignore里
一般来说,需要加Windows / Mac / Linux + 你的特定项目,都可以在这里找:
https://github.com/github/gitignore/tree/master/Global
懂了!谢谢廖老师!
Sign in to make a reply
第二十二军规
我用Matlab写代码,每当修改代码的时候,Matlab会自动缓存.asv文件,我就想用.ignore的方法忽略这些.asv文件。我上网找了一个MATLAB.gitigonore文件(https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore),git add和git commit了这个文件。
但是输入git status之后,仍然显示
Untracked files:
(use "git add <file>..." to include in what will be committed)
mycode.asv
为什么git 还在track这个.asv文件啊?