您的位置:首页 > 运维架构 > Linux

How to Ignore new commits for git submodule

2017-08-25 10:41 453 查看
the git occured serveral new commits like:

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified:   bbi (new commits)
modified:   bbif (new commits)
modified:   c2c (new commits)
modified:   e6 (new commits)
modified:   nodetestif (new commits)


and I don’t know how it comes and the git clean -xdf,git checkout .,git checkout – are all don’t work.

So how to fix it?

Just run:

$ git submodule update


This will revert the submodule the to old commit (specified in parent-repo), without updating the parent-repo with the latest version of the submodule.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git linux