我是靠谱客的博主 明亮服饰,最近开发中收集的这篇文章主要介绍git subproject commit xxxxxxxxxxxxxxxxxxxxx -dirty,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

-Subproject commit 8c75e65b647238febd0257658b150f717a136359
+Subproject commit 8c75e65b647238febd0257658b150f717a136359-dirty

不知道如何操作出现的 dirty , 可印象中又什么都修改过

解决办法, 进入提示的那个文件夹中 git checkout .

摘录出来的部分英文回复如下:

As mentioned in Mark Longair's blog post Git Submodules Explained,

Versions 1.7.0 and later of git contain an annoying change in the behavior of git submodule.
Submodules are now regarded as dirty if they have any modified files or untracked files, whereas previously it would only be the case if HEAD in the submodule pointed to the wrong commit.

The meaning of the plus sign (+) in the output of git submodule has changed, and the first time that you come across this it takes a little while to figure out what’s going wrong, for example by looking through changelogs or using git bisect on git.git to find the change. It would have been much kinder to users to introduce a different symbol for “at the specified version, but dirty”.

You can fix it by:

  • either committing or undoing the changes/evolutions within each of your submodules, before going back to the parent repo (where the diff shouldn't report "dirty" files anymore). To undo all changes to your submodule just cd into the root directory of your submodule and do git checkout .

    dotnetCarpenter comments that you can do a: git submodule foreach --recursive git checkout .

  • or add --ignore-submodules to your git diff, to temporarily ignore those "dirty" submodules.

New in Git version 1.7.2

As Noam comments below, this question mentions that, since git version 1.7.2, you can ignore the dirty submodules with:

git status --ignore-submodules=dirty

答案出处: http://stackoverflow.com/questions/4873980/git-diff-says-subproject-is-dirty

转载于:https://www.cnblogs.com/debmzhang/p/5061380.html

最后

以上就是明亮服饰为你收集整理的git subproject commit xxxxxxxxxxxxxxxxxxxxx -dirty的全部内容,希望文章能够帮你解决git subproject commit xxxxxxxxxxxxxxxxxxxxx -dirty所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部