美文网首页
IOS学习笔记-xcode与git

IOS学习笔记-xcode与git

作者: 5f375ff95999 | 来源:发表于2015-05-15 12:15 被阅读0次

多个git账户的设置

ssh-gen倒不用多说,多个账户的关键是要新增个文件:

cd ~/.ssh
touch ssh_config

注意,WIN下文件名是config

内容大概是这样的格式:

HOST:A.com
    User:demo1
    IdentifyFile: ~/.ssh/demo1_rsa

HOST:B.com
    User:demo2
    IdentifyFile: ~/.ssh/demo2_rsa

删除HOST缓存,重试:

rm known_hosts

xcode与git

  1. github上先新建项目A,注意先不要初始化
  2. 使用xcode新建项目,注意要勾选使用本地GIT
  3. 命令行下初始化一下,不然IDE上配置容易出错
cd 项目文件夹
git remote add origin git@github.com:XX/A.git[项目地址]
git pull -u origin master[从网址拉取项目]
git push -u origin master[向网站提交项目]

相关文章

网友评论

      本文标题:IOS学习笔记-xcode与git

      本文链接:https://www.haomeiwen.com/subject/ewzhqttx.html