Why do you need .gitignore?
At Git. Not all documents in the project folder should be submitted under version control. (e) A library of dependence (e.g.,
node_modules
, Local Profile (includes API) Keys) and the automated thumbnail file of the operating system not only occupy warehouse space, but may also lead to the disclosure of sensitive information or unnecessary consolidation conflicts.
The specific pains that are being solved.
-
Prevention of sensitive information disclosure:
Auto Ignore
.env、*.pem、config/local.json. -
Reduction in warehouse size:
Excludes the size of the Node.js
node_modulesPython.venv) and compiler(s)/dist,/build,*.exe)。 -
Elimination of Platform Differences:
Ignores the MacOS
.DS_StoreThe Windows.Thumbs.dbThe project is based on a private configuration of the IDE (VS Code, IntelliJ IDA). -
Avoiding invalid conflicts:
Ignore often changing local caches and log files (
*.log♪ Let's go ♪git statusKeep it clear.
Advantages of this tool
Manually
.gitignore
It's time-consuming and easy to miss. This generator brings together official and community maintenance from GitHub.
300+Professional Templates
:
-
Multiple templates merged:
For example, your project is a Node.js project developed using VS Code and running on MacOS, you can choose between
Node,VisualStudioCodeandmacOS。 The tool automatically heavyes them and merges them into a perfect file. - Real-time dynamic generation: Click to generate online editing without waiting for page refreshment.
-
One-click download:
Upon generation, download directly to standard
.gitignoreFile, just put it in the root directory.
Recommendations for best practices
-
Other Organiser
Yes.
git initAnd then for the first timegit add .Other Organiser If the document is tracked, the modification of the oversight rule will not be effective, and implementation is required at this timegit rm -r --cached .Reindexes. -
Use .gitignore.example:
If some configurations must be manually filled out by the developers according to local environment, an example file can be submitted and in
.gitignore. Ignores the actually running profile. -
Global ignores vs items:
Yeah.
.DS_StoreSystem files generated by this personal custom, which are suggested to be configured to ignore them globally (git config --global core.excludesfile) not every item.