V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
icesnow
V2EX  ›  git

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

  •  
  •   icesnow · 2012-04-01 00:46:03 +08:00 · 19592 次点击
    这是一个创建于 4406 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用pathogen.vim 来管理vim插件,但总是出现untracked content

    git status

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

    请问这个是什么问题?如何解决?
    5 条回复    2014-05-25 10:59:17 +08:00
    eth2net
        1
    eth2net  
       2012-04-01 01:16:07 +08:00 via iPhone
    pathogen+git submodule么?
    cd到那些目录下再git status一下就知道了,使用插件后产生的doc/tags文件就是untracked content,烦的话写.gitignore吧
    flycarl
        2
    flycarl  
       2012-04-13 10:45:02 +08:00
    git config --global core.excludesfile '~/.cvsignore'
    echo tags >> ~/.cvsignore

    pythogen's author advise the above two command
    foursking
        3
    foursking  
       2013-06-09 10:26:13 +08:00
    hi 我最近也遇到了这个问题 请问你找到了解决方案了吗
    imlz
        4
    imlz  
       2014-03-20 14:41:30 +08:00
    @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
        5
    imlz  
       2014-05-25 10:59:17 +08:00
    # 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不熟练,没用,现在看来还是超级方便的哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2761 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 15:48 · PVG 23:48 · LAX 08:48 · JFK 11:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.