开发者

Adding a git repository to Xcode 4

When I add an开发者_如何学C existing repository to Xcode (using "Add Working Copy") I get the error message "Unable to load revisions".

Any suggestions on what to do?


From your question, I'm assuming you do not have a remote repository and only a local one?

If so, I had this problem many times as well, and no matter what I did, Xcode wouldn't recognize my git revisions. So, I simply restarted Xcode in frustration and it worked. Hopefully its as simple as that for you.


You know what? I wouldn't.

Xcode's "version control" interface is built to be agnostic about which back-end it's using, SVN or git. It's built for the lowest common denominator of shared features. As a result, most of the power of git is explicitly not supported within Xcode itself.

I quit using Xcode's version control completely when I realized this. I like Tower 2 for a gorgeous and Mac-ish git GUI, and the command line for most of my heavy lifting.


I'm assuming you have your repository added in Organizer. You clone the revision to a local folder where your changes are saved. You then work inside the cloned folder, committing and pushing changes up to your repository.

While I won't go so far to say don't use git in XCode, the implementation does leave something to be desired. So unless you are going to use git entirely in the command line (which learning some commands is almost going to be required to pull off after the fact git implementation), it is going to take some work.

Here is a link how to set up git in XCode by github.

XCode 4 released with git integration

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜