我在使用Git时遇到困难,似乎无法添加我的文件。 我运行了ls
命令显示这些文件在当前目录中,然后运行git add .
和git status
命令,但是状态为“nothing to commit”。
JJ-Computer:first_app JJ$ git init
Reinitialized existing Git repository in /Users/JJ/rails_projects/first_app/.git/
JJ-Computer:first_app JJ$ ls
Diary.txt README.rdoc config.ru log tmp
Gemfile Rakefile db public vendor
Gemfile.lock app doc script
README config lib test
JJ-Computer:first_app JJ$ git add .
JJ-Computer:first_app Jenn$ git status
# On branch master
nothing to commit (working directory clean)
JJ-Computer:first_app JJ$
git add . --force
。 - RaulGMgit add --all
对我很有用。感谢你的付出。 - Daniel L. VanDenBosch