How to add an exception to .gitignore, like "ignore all the .dll files BUT myfile.dll"?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
If you want to ignore whole folder, except some specific files, then write:
This won't work:
You can have several
.gitignore
files working together in a hierarchical manner to achieve your goal. At the root level you may have:root
inside the folder having the
myfile.dll
you can add another.gitignore
file like so:root/lib/folderwithMyFiledll
more info here
You can also ignore folders like
you can also ignore nested folder with patterns like
Use
!
to negate the pattern: