【问题标题】:How to find private files in git repo which is equvalent of private files in clearcase/cleartool?如何在 git repo 中找到与 clearcase/cleartool 中的私有文件等效的私有文件?
【发布时间】:2019-09-05 00:01:42
【问题描述】:

我将 git 用于我的 C 项目的 scm。 查找项目构建过程中生成的所有文件(如 .o 和 .so 文件)的命令是什么? 我要问的内容与 cleartool/clearcase 中的私有文件相同。

【问题讨论】:

    标签: git clearcase cleartool


    【解决方案1】:

    您可以从列出被忽略的文件开始,正如我在 2009 年提出的那样:

    git ls-files -o -i --exclude-standard
    

    那是因为那些生成的文件应该在.gitignore 文件中。

    更一般的列表是the untracked files

    git ls-files -o --exclude-standard
    

    那将是我在 2013 年用“ClearCase delete view private files only”提到的 ct ls-private 的关闭。

    【讨论】:

      【解决方案2】:

      没有这样的命令。

      Git 不知道不同文件的用法。你告诉 git 跟踪一个文件——它会跟踪它的历史。您如何找到这些文件将取决于您的个人项目(Makefile、XCode/VisualStudio 配置等)。

      但是,可以使用.gitignore 文件将 git 配置为忽略此类文件。有关详细信息,请参阅文档:https://git-scm.com/docs/gitignore

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-04-04
        • 2019-12-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-31
        • 1970-01-01
        相关资源
        最近更新 更多