git总是出现untracked content怎么解决?

2012 年 4 月 1 日
 icesnow
使用pathogen.vim 来管理vim插件,但总是出现untracked content

git status

modified: bundle/markdown (modified content, untracked content)
# modified: bundle/ultrablog (untracked content)
# modified: bundle/zencoding (untracked content)

请问这个是什么问题?如何解决?
21203 次点击
所在节点    git
5 条回复
eth2net
2012 年 4 月 1 日
pathogen+git submodule么?
cd到那些目录下再git status一下就知道了,使用插件后产生的doc/tags文件就是untracked content,烦的话写.gitignore吧
flycarl
2012 年 4 月 13 日
git config --global core.excludesfile '~/.cvsignore'
echo tags >> ~/.cvsignore

pythogen's author advise the above two command
foursking
2013 年 6 月 9 日
hi 我最近也遇到了这个问题 请问你找到了解决方案了吗
imlz
2014 年 3 月 20 日
@foursking 我是这样解决的,在bashrc里加入如下代码
# gitsubupdate
function gitsubupdate()
{
fn=`git commit | grep 'modified:' | sed -e 's/.*: *\(.*\) .* .*/\1/g'`
for name in $fn
do
rm -rf $name
rm -rf './git/submodule/'$name
git submodule init
git submodule update
done
}
之后source .bashrc后在git的根目录运行gitsubupdate即可
imlz
2014 年 5 月 25 日
# gitsubupdate
function gitsubupdate()
{
git commit | grep 'modified' | grep 'untracked' | awk '{print "rm -fr " $2 "&& rm -fr ./git/submodule/"$2}' | sh
git submodule init
git submodule update
}


之前awk不熟练,没用,现在看来还是超级方便的哈

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.ih06.com/t/31074

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX