简体   繁体   English

如何在 git 存储库中创建 .gitignore 文件并在此 .gitignore 文件中添加文件/文件夹的名称,以便 git 可能不会跟踪这些文件

[英]How to make a .gitignore file in a git repository and add names of the Files/Folders in this .gitignore file so that git may not tracked these files

Git ##*As i am facing problem i have initialized git repository using Git ##*当我遇到问题时,我已经使用

git init but there is no git ignore file anyone who can guide me i want to make my git not to monitor some files like node modules folder etc thanks in advance* git init 但没有任何人可以指导我的 git ignore 文件

you can add the .gitignore file manually.您可以手动添加 .gitignore 文件。 See there for usefull template: https://github.com/github/gitignore查看有用的模板: https : //github.com/github/gitignore

You can create the ignore file by touch .gitignore in git bash.您可以在 git bash 中通过touch .gitignore创建忽略文件。
Here is a template ignore file for node:这是节点的模板忽略文件:
https://github.com/github/gitignore/blob/7293c14345c205c679722364a01b88d331e862ff/Node.gitignore#L41 https://github.com/github/gitignore/blob/7293c14345c205c679722364a01b88d331e862ff/Node.gitignore#L41

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM