git 对我从 ./autogen.sh 和 ./configure 生成的文件做了什么?

发布于 2025-01-07 06:24:15 字数 564 浏览 3 评论 0原文

我正在开发的项目使用 autogen.shconfigure 来设置编译,并生成诸如 config.h 等文件。现在,生成后,我假设这些文件将未被跟踪,因此 git status 应该列出这些文件。但是,在运行这两个脚本后执行此操作实际上会产生以下输出:

owner@ubuntu:~/project$ git status
# On branch master
nothing to commit (working directory clean)

nothing to commit (working Directory clean) 意味着自上次提交以来没有任何更改。此外,它没有告诉我您的分支领先于“origin/master”X次提交。,这意味着没有进行新的提交(由git log确认) )。

如果这些文件没有被取消跟踪并且还没有被提交,那么 git 如何处理这些文件?我应该提到的是,任何地方都没有 .gitignore 文件。

The project I'm working on uses autogen.sh and configure to set up compilation, and these generate files such as config.h and others. Now, when generated, I would assume that these files would be untracked and so git status should list these files. However, doing so after running these two scripts actually produces this output:

owner@ubuntu:~/project$ git status
# On branch master
nothing to commit (working directory clean)

The nothing to commit (working directory clean) implies that nothing has changed since the last commit. Furthermore, it does not tell me that Your branch is ahead of 'origin/master' by X commits., meaning that no new commits have been made (confirmed by git log).

If these files aren't untracked and they have not been committed, how is git treating these files? I should mention that there are no .gitignore files anywhere.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

今天小雨转甜 2025-01-14 06:24:15

git 没有任何特殊的魔法来处理这些文件,尽管也许您的项目确实隐藏在其他地方。检查 git status --ignored 来查看它们是否被忽略。

如果是这样,您还应该检查 .git/info/exclude 以及 git 中的任何全局忽略配置,以查看它们是否导致这些文件被忽略。

git doesn't have any special magic for handling those files, though perhaps your project does hidden away somewhere else. Check with git status --ignored to see if they are being ignored anyway.

If so, you should also check .git/info/exclude, and any global ignore configuration you have in git, to see if they are responsible for those files being ignored.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文