84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
想要达到 upload 文件夹下忽略所有文件跟踪,但不忽略 index.html ,单规则
在.gitignore 文件里设置如下
uploads/* uploads/!index.html
但不起作用, index.html 也被忽略了,不跟踪了。 请问是这个语法有问题吗?
Git 版本 2.6.3
欢迎选择我的课程,让我们一起见证您的进步~~
upload !upload/index.html
在upload文件夹下新建.gitignore,内容如下:
* !.gitignore !index.html
upload
.gitignore
交换下位置, 因为你的这个规则为
忽滤upload文件夹下的所有文件, 然后你再不让其忽滤index.html, 所有文件都被忽滤了,当然index.html就不存在了
index.html
亲测这么写uploads/* uploads/!index.html不行,后来我研究了一下,可以这么写,看我的博文吧http://blog.csdn.net/CalShell...
在upload文件夹下新建.gitignore,内容如下:
2楼是正确的, 你要是不想在
upload
文件夹下新增.gitignore
, 你可以把你的代码交换下位置, 因为你的这个规则为
亲测这么写
uploads/* uploads/!index.html
不行,后来我研究了一下,可以这么写,看我的博文吧http://blog.csdn.net/CalShell...