您现在的位置是:首页 > 电脑 > 

.gitignore文件,我应该把它放在我的xcode项目中?(.gitignore file, where should I put it in my xcode project?)

2025-07-18 09:45:59
.gitignore文件,我应该把它放在我的xcode项目中?(.gitignore file, where should I put it in my xcode project?) 我想要git忽略我的XCode4项目中的UserInterfaceState.xcuserstate文件,但我应该放在.gitignore文件?,它是在.git文件夹内? 还是出
.gitignore文件,我应该把它放在我的xcode项目中?(.gitignore file, where should I put it in my xcode project?)

我想要git忽略我的XCode4项目中的UserInterfaceState.xcuserstate文件,但我应该放在.gitignore文件?,它是在.git文件夹内? 还是出来? .git与Projectame.xcodeproj文件在同一个文件夹中

I want git to ignore my UserInterfaceState.xcuserstate file in my XCode4 project, but where should I put the .gitignore file?, is it inside the .git folder? or out? The .git is in same folder with the Projectame.xcodeproj file

最满意答案

您可以在项目的每个目录中都有一个.gitignore 。

但是,最佳做法是在项目根目录下放置一个.gitignore文件,并将要忽略的所有文件放在其中,如下所示:

ignoredFile.whatever ignoredDirectory/* directory/ignoredFileInsideDirectory .svn

创建.gitignore文件后,具有更改或新增到存储库中的忽略文件将不会显示为等待提交。

您还可以有一个全局本地git忽略文件,这将管理您的所有git存储库。

git config --global ~/.gitignore_global

对于非项目相关的忽略文件,如IDE相关文件等,此替代方法特别有意义。

You can have a .gitignore in every single directory of your project.

However, the best practice is to have one single .gitignore file on the project root directory, and place all files that you want to ignore in it, like this:

ignoredFile.whatever ignoredDirectory/* directory/ignoredFileInsideDirectory .svn

Once you create the .gitignore file, the ignore files that have changes or are new into the repository will not be shown to as waiting for commit.

You can also have one global local git ignore file, that will manage all of your git repositories.

git config --global ~/.gitignore_global

This alternative is particularly interesting for ignored files that are non-project related, such as IDE related files and so on.

#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格

本文地址:http://www.dnpztj.cn/diannao/61869.html

相关标签:无
上传时间: 2023-04-21 00:31:27
留言与评论(共有 8 条评论)
本站网友 野烟叶
19分钟前 发表
the best practice is to have one single .gitignore file on the project root directory
本站网友 乌鲁木齐商铺出租
12分钟前 发表
and place all files that you want to ignore in it
本站网友 四维彩超看胎儿性别
17分钟前 发表
但是
本站网友 联洋二手房
6分钟前 发表
that will manage all of your git repositories. git config --global ~/.gitignore_global This alternative is particularly interesting for ignored files that are non-project related
本站网友 肇庆电影院
5分钟前 发表
is it inside the .git folder? or out? The .git is in same folder with the Projectame.xcodeproj file 最满意答案 您可以在项目的每个目录中都有一个.gitignore
本站网友 佛山商铺出租
22分钟前 发表
它是在.git文件夹内? 还是出来? .git与Projectame.xcodeproj文件在同一个文件夹中 I want git to ignore my UserInterfaceState.xcuserstate file in my XCode4 project
本站网友 陈奋健
2分钟前 发表
such as IDE related files and so on.