how to make svn or git only monitor a list of files, but ignores anything else
-
01-07-2021 - |
Pregunta
for example there are lots of files in one directory, but i only want to monitor Makefile and rules.mk ... , what i should input to .gitignore or .svnignore?
ls
bin Config.in docs include **Makefile** Packages README.SDK scripts target
build_dir dl feeds.conf.default LICENSE package Packages.gz **rules.mk** staging_dir tmp
Solución
The rules for a .gitignore
file would ignore everything and then exclude Makefile
and rules.mk
>>.gitignore cat
*
!Makefile
!rules.mk
Note that you could just ignore everything after you have added Makefile
and rules.mk
and you wouldn't notice a difference.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow