-1

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

長い PATH でファイルを git-add するにはどうすればよいですか?


走る

$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)
$         
4

3 に答える 3

5

これらのディレクトリは空ですか? その場合、Git は空のディレクトリを追跡しません。

これらのディレクトリをリポジトリに追加する必要がある場合は、それぞれに空の「.gitignore」ファイルを追加してみてください。

この設計上の決定に関する背景情報については、Git メーリング リストのこのスレッドを参照してください。

于 2009-07-04T00:57:58.427 に答える
2

それらのフォルダー内のファイルが何らかの形で無視されている可能性がありますか? .gitignore および .git/info/exclude ファイルを確認してください。

于 2009-07-04T00:51:05.400 に答える