Wie kann ich eine neue Datei auf mein Git-repository?

Ich bin momentan dabei, einige neue Dateien und ich versuche, um Sie hinzuzufügen, aber wenn ich git add applications/libraries/calendarclass.php es wird nicht erkannt, dass ich eine Datei dort

Ich gerade erstellt, die Datei in textmate und bin starrte es an. Wie füge ich es in 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

Wenn ich git status

libraries$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)
  • Tatsächlich, Ihre ls Ausgabe nicht in die Datei dort auch. Wie sollte git erraten, welche Datei Sie möchten, um es hinzuzufügen?
InformationsquelleAutor David | 2011-06-30
Schreibe einen Kommentar