git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
icesnow
V2EX  ›  git

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

  •  
  •   icesnow · Apr 1, 2012 · 20804 views
    This topic created in 5166 days ago, the information mentioned may be changed or developed.
    使用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 replies    2014-05-25 10:59:17 +08:00
    eth2net
        1
    eth2net  
       Apr 1, 2012 via iPhone
    pathogen+git submodule么?
    cd到那些目录下再git status一下就知道了,使用插件后产生的doc/tags文件就是untracked content,烦的话写.gitignore吧
    flycarl
        2
    flycarl  
       Apr 13, 2012
    git config --global core.excludesfile '~/.cvsignore'
    echo tags >> ~/.cvsignore

    pythogen's author advise the above two command
    foursking
        3
    foursking  
       Jun 9, 2013
    hi 我最近也遇到了这个问题 请问你找到了解决方案了吗
    imlz
        4
    imlz  
       Mar 20, 2014
    @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  
       May 25, 2014
    # 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不熟练,没用,现在看来还是超级方便的哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2742 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 02:20 · PVG 10:20 · LAX 19:20 · JFK 22:20
    ♥ Do have faith in what you're doing.