Git and Xcode
1、web site "New Repository"
2、为本地 git 管理的项目添加 Repository
$ cd ~/ProjectName
$ git remote add origin https://github.com/userName/xxx.git
$ git push -u origin master # 第一次提交需要 -u,以后执行提交可以简化不再需要 -u。(原因:第一次提交不但会把本地的 master 分支内容推送到远程新的 master 分支,还会把本地的 master 分支和远程的 master 分支关联起来。)
3、为非本地 git 管理的项目添加 Repository
$ cd ~/Project
$ git init # 初始化,并在当前目录下出现一个名为 .git的目录 # 注意:如果某些文件没有必要提交的,请先创建 .ignore 文件,否则对 已经被跟踪或者 commit 的文件再放进 .gitignore 会失效。 $ git add . # 将给目录下所有不包含在 .ignore 的文件提交
$ git commit -m "Initial commit"
# reopen xcode, Source Control was enable # 执行第二步 "为本地 git 管理的项目添加 Repository"
# create Repository and copy repository address, Xcode.Preferance.Accounts add repository
关于 .ignore 请参考 ref
4、Xcode project 在创建的时候,就勾选上使用本地 git 管理。
也需要执行第二步 “为本地 git 管理的项目添加 Repository”,以后才能在 Xcode -> Source Control -> push。
5、拷贝他人的 git project
$ git clone repository address
Git and Xcode的更多相关文章
- [翻译] USING GIT IN XCODE [6] 在XCODE中使用GIT[6]
USING GIT IN XCODE KEEPING IN SYNC WITH REMOTE REPOSITORIES As you make changes in your local workin ...
- [翻译] USING GIT IN XCODE [5] 在XCODE中使用GIT[5]
USING GIT IN XCODE USING BRANCHES Branches can be a very effective tool to isolate new features or e ...
- [翻译] USING GIT IN XCODE [4] 在XCODE中使用GIT[4]
USING GIT IN XCODE LOOKING AT HISTORY Xcode provides a Versions editor, which has three different pe ...
- [翻译] USING GIT IN XCODE [3] 在XCODE中使用GIT[3]
USING GIT IN XCODE MAKING AND COMMITTING CHANGES Once you have a working copy of your project, it’s ...
- [翻译] USING GIT IN XCODE [2] 在XCODE中使用GIT[2]
USING GIT IN XCODE http://www.cimgf.com/2013/12/10/using-git-in-xcode/ USING AN EXISTING REMOTE PROJ ...
- [翻译] USING GIT IN XCODE [1] 在XCODE中使用GIT[1]
USING GIT IN XCODE http://www.cimgf.com/2013/12/10/using-git-in-xcode/ Git has become a very popular ...
- Git在Xcode中的配置与使用常见问题总结
书接上回提出的Git在Xcode中的配置与使用常见问题4个问题 问题1,如何在Xcode中创建代码库,并添加和提交代码到代码库? 问题2,如何在Xcode中提交推送给远程服务器代码库? 问题3,如何在 ...
- iOS 从git拷贝Xcode的snippets
do following things in terminal 1. check out the project using: git clone gitAddress 2. cd the proje ...
- Git - 忽略Xcode工程中UserInterfaceState.xcuserstate文件的问题
一.在同 .Git目录下创建.gitignore文件.在文件中加入如下内容: *.xcuserstate project.xcworkspace xcuserdata UserInterfaceSta ...
随机推荐
- android 自定义相机画面倒立解决方案
有部分手机的影像是倒立的,如何解决这个问题呢? 请看下面 public static void setCameraDisplayOrientation(Activity activity, int c ...
- Wireshark分析非标准端口号流量
Wireshark分析非标准端口号流量 2.2.2 分析非标准端口号流量Wireshark分析非标准端口号流量 应用程序运行使用非标准端口号总是网络分析专家最关注的.关注该应用程序是否有意涉及使用非 ...
- POJ1797 Heavy Transportation(SPFA)
题目要求1到n点的最大容量的增广路. 听说是最短路求的,然后乱搞就A了.. 大概能从Bellman-Ford的思想,dk[u]表示从源点出发经过最多k条边到达u点的最短路,上理解正确性. #inclu ...
- Unity3D shader脚本
Unity中的shader脚本,是用叫做shaderlab的脚本语言来写.这个unity中的shader不只是DX中HLSL写的顶点和像素shader,而应该说是对应着DX中的Effect脚本,定义了 ...
- ural 1222. Chernobyl’ Eagles
1222. Chernobyl’ Eagles Time limit: 1.0 secondMemory limit: 64 MB A Chernobyl’ eagle has several hea ...
- BZOJ3483 : SGU505 Prefixes and suffixes(询问在线版)
将每个串正着插入Trie A中,倒着插入Trie B中. 并求出每个串在A,B中的dfs序. 每次查询等价于查询在A中dfs序在[la,ra]之间,在B中dfs序在[lb,rb]之间的串的个数,用主席 ...
- Mina小例子
此例子解决了中文乱码问题. 客服端: MimaTimeClient.java package minaExamle.client; import java.net.InetSocketAddress; ...
- "504 Gateway Time-out"
"504 Gateway Time-out”是什么意思? 意思为:网关超时!
- 八、job管理
查看用法: [root@super65 ~]# salt-run -d|grep jobs'jobs.active:' #查看当前执行的job Return a report on all activ ...
- IIS7 Appcmd.exe 使用
如果您运行的是 64 位 Windows,请从 %windir%\system32\inetsrv 目录而不是 %windir%\syswow64\inetsrv 目录中使用 Appcmd.exe. ...