Git的说,使用无法通过的Git
git add
到未跟踪文件添加到我的回购协议。
我已经失败运行
git add shells/zsh/keyboard_configs/
git add shells/zsh/references/
git add shells/zsh/keyboard_configs/*
git add shells/zsh/references/*
git add shells/zsh/keyboard_configs/*<TAB>
git add shells/zsh/references/*<TAB>
git add .
我仍然得到这些文件是未跟踪,当我看到它在
git status
在长路径的你怎么能混帐添加文件?
我跑
$git status ~/bin
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# shells/zsh/keyboard_configs/
# shells/zsh/references/
nothing added to commit but untracked files present (use "git add" to track)
$git add shells/zsh/keyboard_configs ~/bin
$git add shells/zsh/references ~/bin
以下是令人意想不到的。我希望我添加了要跟踪的文件夹及其内容。
$git status ~/bin
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# shells/zsh/keyboard_configs/
# shells/zsh/references/
nothing added to commit but untracked files present (use "git add" to track)
$
Git中的“长路径”没有问题。请展示一个完整的示例,从具有“git init”的空白存储库开始,显示您遇到的问题。包括命令的输出和你期望看到的解释。 – 2009-07-04 00:31:50
@Greg:请看我的编辑。 – 2009-07-04 00:44:25
我尝试了你在新存储库中显示的内容,并且所有内容都按照我的预期工作。也就是说,在运行“git add shells/zsh/keyboard_configs /”后,我放入该目录的文件在“git status”中正确显示为新文件。再次,请展示一个从“git init”开始的完整示例来演示您的问题。 – 2009-07-04 00:53:40