2015-11-21 24 views
0

推我想添加一個IOS項目到位桶, 所以我這樣做:錯誤提交,並在到位桶

cd /path/to/my/project 
git init 
git remote add origin https://[email protected]/nunito/my_first_app_ios.git 

acBook-Pro-de-nunito:MyFirstApp nunito$ git commit -m 'Initial commit' 
On branch master 

Initial commit 

Untracked files: 
    MyFirstApp.xcodeproj/ 
    MyFirstApp/ 
    MyFirstAppTests copy-Info.plist 
    MyFirstAppTests/ 
    icons/ 

nothing added to commit but untracked files present 

但同時,項目還沒有被添加到Git的!!!!

+1

您需要提交之前,運行'git add'。 – Rob

回答

1

您需要在提交前添加文件!

例如,您可以添加這樣的文件或目錄:

git commit -m "This is commit message to show what does the added file do" 

然後運行git push -u origin master推到原點回購的主分支,並設置:

git add filename 

然後用郵件提交即origin master分支作爲本地主分支的上游。

臨Git是真是一本好書,學習的git:https://git-scm.com/documentation