git:隐藏/删除永远不会被版本化的文件 [英] git: hide/remove files never to be versioned
本文介绍了git:隐藏/删除永远不会被版本化的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图开始使用git和tortoise-git。
有没有办法隐藏永远不会被完全跟踪的文件?目前,当我提交更改时,所有临时构建文件与新文件都处于相同的未版本化列表中。
解决方案
在根文件夹中创建名为
.gitignore
的文本文件,添加如下行来排除文件: *。obj
test.c
然后将.gitignore添加到您的git存储库并提交:
$ git add .gitignore
$ git commit .gitignore
I'm trying to get started using git and tortoise-git.
Is there a way to hide files that should never be tracked completely? Currently, all temporary build files are in the same "Not Versioned" list as new files when I commit a change.
解决方案
Create a text file called .gitignore
in your root folder and add lines like the following to exclude files:
*.obj
test.c
Then add .gitignore to your git repository and commit:
$ git add .gitignore
$ git commit .gitignore
这篇关于git:隐藏/删除永远不会被版本化的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文