when I want to implement git Synchronize, I ignore the folders under node_modules except @ wang, that is to say, keep the @ wang folder. How should I configure .gitignore files
when I want to implement git Synchronize, I ignore the folders under node_modules except @ wang, that is to say, keep the @ wang folder. How should I configure .gitignore files
in fact, this kind of problem is already written in the git
document, but you may not read the document or ignore it.
Example to exclude everything except a specific directory foo/bar (note the / *-without the slash, the wildcard would also exclude everything within foo/bar):
$ cat .gitignore
-sharp exclude everything except directory foo/bar
/*
!/foo
/foo/*
!/foo/bar
knowing this, come back to your question
node_modules/
//
!node_modules/@wang
but you may have ignored the node_modules as a whole before, resulting in adding the exclusion file now, which has no effect.
look at the document again at this time. It is said that you can refer to:
SEE ALSO
git rm official documentation
if you look at it, you can see:
// -r
// --cached
git rm -r --cached node_modules/@wang
git status
//
then you will find that the node_modules/@wang
folder is ready to submit.
if you think there is something wrong with English documents, you can download tools such as translation plug-ins, or search for Chinese documents.
or you can search for keywords such as Bing search , search git
to exclude a folder under the ignored folder if you can't surf the Internet scientifically.
here is a hole, flip under Baidu, this article can solve your problem
Previous: The vue Engineering Project report quotes errors that cannot be found in Google cdn's jq file.
No problem on this machine and on my own server your own server github pages ...
I m the front end, and I can t run the project after I send it to the github, test and download it. The following is a screenshot 1. The computer is equipped with node.js problems caused by 2.npm install ...
it used to be unloaded and reloaded like this ...