我尝试添加所有文件,但无法添加文件。我需要做什么?
➜ dotfiles git:(master) git add .
➜ dotfiles git:(master) git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: .vim/bundle/ultisnips (untracked content)
# modified: .vim/bundle/ultisnips-rspec (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
更新:我的.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# other files #
#####################
*.swp
*.swo
# git mergetool #
*.orig
答案 0 :(得分:2)
您的更改似乎位于子模块中。作为git status
提示的输出,您必须在子模块内的子模块中添加和提交更改,例如:
cd .vim/bundle
git add .
git status