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

时间: 2024-10-12 19:49:00

git subproject commit xxxxxxxxxxxxxxxxxxxxx -dirty的相关文章

“Will not add file alias 'samefile' ('SameFile' already exists in index)” when `git add/commit` operation

从远程仓库pull下来的代码有两个类类名首字母小写出现如下情况 然后我想删了重新写一下(就是把这个类删了,代码复制到名字正确的类里面),然后commit的时候出现这个错误,后来删一个commit一下,就可以commit,暂时估计是删了之后commit把原先index里面的清空了 "Will not add file alias 'samefile' ('SameFile' already exists in index)" when `git add/commit` operation

Git 撤销commit的注意事项

Git撤销commit的操作命令  git reset --hard HEAD^ 一.新建三个文件,demo1,demo2,demo3 二.git add 命令提交到暂存区,git reset HEAD demo1就是把提交到暂存区里的文件撤销. 上图中,执行git reset HEAD demo1就会把demo1从暂存区中撤销,现在是untracked. 三.git commit 提交本地仓库 上图中显示,git commit把demo2,demo3提交到本地仓库中. 四.现在想撤销之前的co

Git的commit your changes or stash them before you can merge

今天用git pull来更新代码,遇到了下面的问题: error: Your local changes to the following files would be overwritten by merge: xxx/xxx/xxx.java Please, commit your changes or stash them before you can merge. Aborting 但是服务器没有任何手动修改文件行为,很奇怪经常遇到莫名的这类问题 好吧,算啦,直接说最终的解决办法吧 1.

[Git] 还原Git上commit,但是没有push代码

直接在Idea上操作2步解决: 1. 找到: 2. 在To Commit里面填写:HEAD^,表示将commit的信息还原为上一次的,需要多次直接reset多次即可: 使用命令行:原理一样 以下内容转载: http://zhyq0826.iteye.com/blog/1671638 如果不小心commit了一个不需要commit的文件,可以对其进行撤销. 先使用git log 查看 commit日志 commit 422bc088a7d6c5429f1d0760d008d86c505f4abe

[Practical Git] Filter commit history with git log arguments

In the last lesson, we learned how to format the git log output; in this lesson we will learn how to filter down to a specific set of commits. By default, git log shows every commit in a repo. We will walk through using a bunch of options to filter o

git之commit改用第三方编辑器

git commit -m "***"方式提交注释,有限制,可通过调用第三方编辑器来编辑更好的注释 1 使用window自带的记事本 git config --global core.editor notepad//或者对当前用户有效git config core.editor notepad 可惜会存在中文乱码的问题! 暂时没去找解决方案.推荐方法2 2 用sublime来打开 先下载安装sublime,然后在环境变量path中,把sublime的安装目录路径添加进去. 如:***;

[Practical Git] Format commit history with git log arguments

When running the git log command, we can pass in options as arguments toformat the data shown for each commit. In this lesson, we show how to use the oneline, decorate, graph, stat, and p options with git log. Show it oneline: git log --oneline git l

git 撤销commit

起因: 不小新把记录了公司服务器IP,账号,密码的文件提交到了git 方法: git reset --hard <commit_id> git push origin HEAD --force 其他: 根据–soft –mixed –hard,会对working tree和index和HEAD进行重置:    git reset –mixed:此为默认方式,不带任何参数的git reset,即时这种方式,它回退到某个版本,只保留源码,回退commit和index信息    git reset

git根据commit生成patch(转载)

转自:http://smilejay.com/2012/08/generate-a-patch-from-a-commit/ 在看一个Bugzilla上Xen的一个bug时,提到要revert掉Dom0(用linux.git)中一个commit,当然git是有revert命令的,如下所示. [[email protected]linux linux.git]# git revert cd9db80e5257682a7f7ab245a2459648b3c8d268 warning: too man