Can you have additional .gitignore per directory w

2019-01-31 05:35发布

Can you create a .gitignore file in a directory that only applies to files (and directories) within that directory?

3条回答
男人必须洒脱
2楼-- · 2019-01-31 05:48

Yes, you can. Try it, it works fine. Put a .gitignore in the root of your repo, and put another .gitignore with additional things to ignore in a subdirectory.

查看更多
家丑人穷心不美
3楼-- · 2019-01-31 05:50

You can just specify files to ignore in a format such as

Xyz/*.abc

in the .gitignore in the root directory, potentially removing the need for separate ignore files.

查看更多
登录 后发表回答