怎么把没有勾选git的 IOS 项目 放到git@osc 上

环知 发布于 2015/03/19 16:37
阅读 1K+
收藏 1
怎么把没有勾选git的 IOS 项目 放到git@osc 上
加载中
0
环知
环知

引用来自“Zoker”的评论

两种方法,一种是在xcode里面选择git,填上git地址,进行commit & push

还有一种是通过命令行打开你的ios项目文件夹,然后执行

git init

git remote add origin you_project_url_on_git

git add .

git commit -m "first commit"

git push origin master


that‘s all

pengfeiwangdeiMac:hh pengfeiwang$ ls

hh hh.xcodeproj hhTests

pengfeiwangdeiMac:hh pengfeiwang$ git init

Initialized empty Git repository in /Users/pengfeiwang/Desktop/gitosc/hh /hh/.git/

pengfeiwangdeiMac:hh pengfeiwang$ git remote add origin https://git.oschina.net/407082303/IOS_Project.git

pengfeiwangdeiMac:hh pengfeiwang$ git add.

git: 'add.' is not a git command. See 'git --help'.

Did you mean this?

add

pengfeiwangdeiMac:hh pengfeiwang$ git add .

pengfeiwangdeiMac:hh pengfeiwang$ git commit -m "dd"

[master (root-commit) c2dc96e] dd

 16 files changed, 901 insertions(+)

 create mode 100644 hh.xcodeproj/project.pbxproj

 create mode 100644 hh.xcodeproj/project.xcworkspace/contents.xcworkspacedata

 create mode 100644 hh.xcodeproj/project.xcworkspace/xcuserdata/pengfeiwang.xcuserdatad/UserInterfaceState.xcuserstate

 create mode 100644 hh.xcodeproj/xcuserdata/pengfeiwang.xcuserdatad/xcschemes/hh.xcscheme

 create mode 100644 hh.xcodeproj/xcuserdata/pengfeiwang.xcuserdatad/xcschemes/xcschememanagement.plist

 create mode 100644 hh/AppDelegate.h

 create mode 100644 hh/AppDelegate.m

 create mode 100644 hh/Base.lproj/LaunchScreen.xib

 create mode 100644 hh/Base.lproj/Main.storyboard

 create mode 100644 hh/Images.xcassets/AppIcon.appiconset/Contents.json

 create mode 100644 hh/Info.plist

 create mode 100644 hh/ViewController.h

 create mode 100644 hh/ViewController.m

 create mode 100644 hh/main.m

 create mode 100644 hhTests/Info.plist

 create mode 100644 hhTests/hhTests.m

pengfeiwangdeiMac:hh pengfeiwang$ git push origin mashter

error: src refspec mashter does not match any.

error: failed to push some refs to 'https://git.oschina.net/407082303/IOS_Project.git'

Zoker
Zoker
这个错误时因为你的master写错了。
2
Zoker
Zoker

两种方法,一种是在xcode里面选择git,填上git地址,进行commit & push

还有一种是通过命令行打开你的ios项目文件夹,然后执行

git init

git remote add origin you_project_url_on_git

git add .

git commit -m "first commit"

git push origin master


that‘s all

0
环知
环知
求指导 啊 
0
环知
环知

引用来自“Zoker”的评论

两种方法,一种是在xcode里面选择git,填上git地址,进行commit & push

还有一种是通过命令行打开你的ios项目文件夹,然后执行

git init

git remote add origin you_project_url_on_git

git add .

git commit -m "first commit"

git push origin master


that‘s all

用  sourceTree 可以了。。  谢谢
返回顶部
顶部