gitignore

.gitignore exclude folder but include specific subfolder

我是研究僧i 提交于 2019-11-25 21:43:22
问题 I have the folder application/ which I add to the .gitignore . Inside the application/ folder is the folder application/language/gr . How can I include this folder? I\'ve tried this application/ !application/language/gr/ with no luck... 回答1: If you exclude application/ , then everything under it will always be excluded (even if some later negative exclusion pattern (“unignore”) might match something under application/ ). To do what you want, you have to “unignore” every parent directory of

Ignoring directories in Git repos on Windows

懵懂的女人 提交于 2019-11-25 20:04:00
How can I ignore directories or folders in Git using msysgit on Windows? stew Create a file named .gitignore in your project's directory. Ignore directories by entering the directory name into the file (with a slash appended): dir_to_ignore/ More info here . brainwavedave By default windows explorer will display .gitignore when in-fact the file name is .gitignore.txt Git will not use .gitignore.txt And you can't rename the file to .gitignore because explorer thinks its a file of type gitignore with no name. Non command line solution: You can rename a file to ".gitignore." and it will create "