提交错误,并推入bitbucket

时间:2015-11-21 14:27:38

标签: git bitbucket

我想将一个IOS项目添加到bitbucket, 所以我这样做了:

cd /path/to/my/project
git init
git remote add origin https://nunito@bitbucket.org/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

但是while项目还没有添加到git !!!!

1 个答案:

答案 0 :(得分:1)

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

例如,您添加如下文件或目录:

git add filename

然后提交消息:

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

然后运行git push -u origin master以推送到原始repo的主分支,并将origin master分支设置为本地主分支的上游。

Pro-git是一本学习git的好书:https://git-scm.com/documentation

相关问题