在现有 Xcode 项目中使用 Git [英] Using Git with an existing Xcode project

查看:29
本文介绍了在现有 Xcode 项目中使用 Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想弄清楚如何在我的项目工作流程中使用 git,并且我有一个现有的 Xcode 项目想要放入存储库.我想我在管理器下正确设置了存储库,但源代码管理菜单呈灰色.
显然,如果您开始一个新项目,这很容易,但如何导入包含快照和所有内容的现有项目?

I am trying to figure out how to use git in my project workflow, and I have an existing Xcode project that I want to put into the repository. I think I have the repository set up correctly under organizer, but the Source Control menu is grayed out.
Apparently, it's easy to do if you start a new project, but how do I import an existing project with snapshots and everything?

我使用的是 Xcode 4 和 git 1.7.4

I'm using Xcode 4 and git 1.7.4

另外,如果有关于 git 配置和最佳实践的任何好的演练,那就太好了.我玩游戏有点晚了,所以任何能让我加快速度的东西都会很酷.

Also, if there are any good walkthroughs on git configuration and best practices, that would be nice. I'm a little late to the game, so anything that can get me up to speed would be cool.

推荐答案

GitHub 在 help.github.com 上有一些非常好的 git 教程.

GitHub has some very good git tutorials at help.github.com.

要对存储库进行初始设置,请打开一个终端窗口,然后 CD 到项目目录.在那里,输入

to do the initial setup of a repository, open up a terminal window, and CD to the project directory. once there, type

git init
git add .
git commit -m "Initial commit"

重启Xcode.现在应该设置存储库,您将能够在 xcode 4 中管理它.

Restart Xcode. The repository should now be set up, and you will be able to manage it in xcode 4.

这篇关于在现有 Xcode 项目中使用 Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆