我創造了一些新的文件,並正嘗試加入他們,但是當我用git add applications/libraries/calendarclass.php
,也不會承認,我有一個文件如何將新文件添加到我的Git存儲庫?
我剛剛創建的TextMate的該文件,並在它正在盯着。我如何將它添加到git?
releventz$ git add application/libraries/calendarclass.php
fatal: pathspec 'application/libraries/calendarclass.php' did not match any files
releventz$ ls
application css index.php license.txt
authnet images js system
releventz$ cd application
application$ ls
cache controllers errors hooks language logs third_party
config core helpers index.html libraries models views
application$ cd libraries
libraries$ ls
MY_Unit_test.php index.html loginclass.php
libraries$ git branch
* master
libraries$ git add calendarclass.php
fatal: pathspec 'application/libraries/calendarclass.php' did not match any files
當我使用git status
libraries$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)
其實,你的'ls'輸出也不會在那裏顯示文件。 git應該怎麼猜測你想在那裏添加什麼文件? –