Tutorial on GIT with Xcode - xcode

I'm trying to understand how to use GIT with Xcode 4.2.
I haven't been using GIT actively, but while I was walking through a couple of git operations mentioned in this link it appears that I have a single repository with many projects in it and a recent project in a repository all by itself.
I want to carefully take the project I am currently working on and put it into its own repository so I can safely leverage some of the branching capabilities.
I'm hesitant to begin until I have a better understanding of what's going on. I'd like to know how much is handled within Xcode and what I have to do at the command line.

#manojids comment to learn a source control system (like git) outside of a specific editors integration is a good point. Try to understand the source control system. The integration is a convenience, not a crutch.
Outside of that advice, apple has some docs outlining specifics of how XCode works with git. Here's the link:
http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/SCM/SCM.html
A good online resource is the pro git book available here:
http://git-scm.com/book

If you want to learn and understand Git and its concepts in detail then this book would be best for you here is the link.
Or you can have a drill on it practically if you follow this tutorial.
I hope you will get help.

Related

What is the best ruby api to git?

I would like to implement a Rake task that automates some of the tasks I have to do to move my changes from development to production (and yes, I know there is something out like Capistrano, and it is way too much for me). In the center, there are some interactive commands like git add -i and a series of commit and push. On the production side, there will be pulls and assets tasks to do.
It is tedious to type in all the time the same commands so I would like to automate it completely. What I have not found is the Ruby API for Git.
It should work under Windows 7, and allow at least the following commands: git add, git status, git commit, git push, git pull.
I know, bad habit, but I would like to document the experiences of this weekend:
There is a similar question on https://softwareengineering.stackexchange.com/questions/62843/best-ruby-git-library that names the 3 relevant candidates: Git, Grit and Rugged.
Git and Grit are not developed further, Rugged is currently developed, but not finished.
Git works out of the box, but has some deficiencies:
There are known shortcomings (see the issues).
I had the problem, that added and changed items are not well matched, they can be in only one of the 2 states (which is not true for Git currently).
The API is reasonable, and works well in console, Ruby script or Rake task.
Grit did not work for me at all, and I did not found the reason. I got stack traces (low level ones), and tried a few patches that could be relevant for usage under Windows 7, but with no success.
Rugged is not installable for me, so I filed a bug to rugged which got some feedback. The problem seems to be that rugged only works for POSIX systems, so it is not compilable with DevKit for Ruby.
So I will try to find a compiled version of libgit2.dll for Windows 7, and will try to use that. I have done that in the past with sqlite3.dll, so perhaps that is the best try. For me, rugged is the most sensible solution, because there are people behind that project, they are interested to provide a solution that works cross platform.
This one seems to be quite popular. If you are more interested in GitHub then you might want to look at this one.
UPDATE:
Rugged seems to be the newest one out there though the Gem for it has not been built in a while. Might be best to use the source from Github.
July 2013 update:
It looks like Rugged is the tool of choice at the moment. It is being actively maintained and it looks like most (all) of the core committers work at github.
Even though grit is the most popular, and is created by one of the github founders, it hasn't been touched for 5 months and has had little activity.
See Ruby-Toolbox for details.

How can I use git from within Xcode?

How can I use git from within Xcode? I've found SVN easy to use from Xcode; can I use git as easily?
You CAN use git easily from Xcode. Easily, but not well.
One of the design decisions Apple made with Xcode was to present a unified interface to version management regardless of what version control system was on the back-end. So if you're using git, you only get the subset of git functionality that svn also supports. No index, no stash, not really even branching.
I've quit trying to use Xcode's onboard git "integration". It's broken by design.
In XCode 4 you get git support natively.
There's a buch of documentations on the internet:
https://github.com/blog/810-xcode-4-released-with-git-integration
http://oleb.net/blog/2011/05/on-git-support-in-xcode-4/
Official doc here.
Also, Google has LOADS of results on this matter...

What do I need to know to create Xcode project templates?

I know some of the tutorials for creating Xcode project templates, for example this one here: http://robnapier.net/blog/project-templates-364
This is the best one I could find. All others basically repeat the same info, or are no longer up to date, or worse tell me that even they don't know what they're doing. Possibly useful tools that are linked to here and in other places are no longer available.
I keep running into roadblocks, and would like to gather as much information as possible on the process of creating Xcode project templates. Info that is most importantly up to date (at least it must be relevant for Xcode 3 or higher).
For example, what I'd like to see is:
a description of the
TemplateChooser.plist and similar
plist files and what these options do
(in my case, once I add a
TemplateChooser.plist, my project
disappears from the Xcode project
template list)
how to create a project template that references another .xcodeproj (when I do that, the other .xcodeproj appears in the project template list even though it doesn't use the special naming convention)
processes that can be applied, for example is it possible to run a script during the creating of a project from a template? This would be useful to unzip certain files into the newly created project.
If you have the answer or suggestions to any of the issues above, I'd appreciate that. Otherwise any link to good Xcode project template resources would be highly recommended. Especially if there is an official documentation from Apple - I haven't found one yet which seems to imply that project templates are undocumented.
Have you seen these:
http://www.sodeso.nl/?p=895
http://www.codeproject.com/KB/iPhone/CreatingXcodeProject.aspx
If you say you have searched, I'm pretty sure you've already seen the links but these are the best resources I could find with my 'googlabilities'
You might try contact this guy - http://linkedin.com/in/mottishneor he has some related messages around the web
The links suggested by FX are also not bad at all!
There is indeed little XCode template info out there. What I have found of interest are the following links (I documented myself on the topic, but haven't yet gone any further):
a Google Code search reveals a few examples, but not much
in particular, I found interesting to look at the code provided by Three20; they have some basic examples, like here
referencing another project worked for me, so maybe you could open a specific question about that giving more details?
there is information scattered on the Apple mailing-lists
there is no official documentation from Apple, as is evidenced by the lack of results to this query
I'm sorry if this is not a Enlighting, concise answer. As you said, it's not well documented, and sources are all over the place. I just hope I could highlight some places to find information that your own searches might not have reached :)
I don't have a Mac anymore, so this is as much as I can give you without testing this myself. As far as I can tell, Xcode templates are undocumented by Apple.
This guy has some guides for messing with Xcode templates but the info is pretty sparse. My suggestion for working with templateChooser.plist is to try to only edit that file in the interface builder.
This guide is a good example of how to add a reference to another .xcodeproj. For the reason you were having trouble adding a reference to your project we probably need more information.
If you scroll way down in this doc you can that each template already includes a script called myscript.sh. This script will show up in the scripts menu for projects built with that template. That isn't quite as convenient as running scripts automatically, but it's better than nothing.
In conclusion, Xcode template documentation is a nightmare. It looks like there are a lot of powerful features there, but they are obscured because of lack of user friendlyness and because documentation lags far behind Apples updates of Xcode. It just doesn't seem to be a priority for them. I hope this helps.
And yet another video link http://howtomakeiphoneapps.com/2010/10/how-to-make-custom-xcode-templates-with-video/

XCode and SCM conflicts

Is there a decent Subversion client available for XCode? I am so tempted to write my own as of this morning after having a conflict on an update. I've done merges manually editing the ">>> mine" and "<<< theirs" markers but there has GOT to be a better way in this day and age. Does anyone know of an easy way to resolve conflicts graphically? It seems like SCM conflicts and svn history queries are my two most missed features in all of the Mac SVN clients I've seen so far. I use Versions and sometimes the built in XCode SCM support. I've also looked briefly at Cornerstones web site. (Is Cornerstone any better?) Does anyone have any ideas?
I'd suggest using git-svn with GitX for most things. The GitX commit interface is so nice it's really hard to go back to anything else.
For conflicts I use Emacs, which offers really nice, fully editable, color-coded 3-way merge.
You also might check out the WWDC 2010 videos/slides (free at Apple's site if you're a registered developer) regarding SCM support in the upcoming version of Xcode.
As a GUI, SmartSVN offers a basic conflict editor (though I find the the application very slow to refresh on a large source tree). Often I find myself going back to Emacs which has support for subversion via Psvn.el, and that has a very capable 3 way diff with ancestor revisions, custom region skipping and other goodies.

Best solution for integrated bug tracking, wiki and version control [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I love the Google Project Hosting web app. It includes bug tracking, wiki and SCM in one interface. (Example: WMD Editor)
This solution is closed source and not for sale. While searching similar solutions I found Trac which has a rougher interface.
Could you list similar solutions?
Someone asked the same question, but specified Git as the SCM.
[EDIT] Since I wrote this answer, an exciting new fully-integrated distributed project management software has hit 1.0: Veracity by SourceGear.
Fossil-SCM is a nice distributed SCM, where "SCM" has the original meaning of "Software Configuration Management" and not the new diluted meaning of "Source Code Management".
What this means is that Fossil integrates distributed version control, distributed bug tracking and distributed wiki into one repository. Not one UI, like, say, Trac but one single repository.
So, if you clone a Fossil repository, you do not just get the latest version of the source code plus all its history, like you would get with Git, Mercurial, Bazaar, Monotone, Darcs or any other version control system, you also get the current bug database plus all its history and the current wiki plus all its history.
Fossil is written by D. Richard Hipp, who is not only the author of SQLite but also CVSTrac (the precursor of Trac). So, you know it's gotta be good.
If you want to see an example of Fossil in action, just the follow the link I posted: Fossil is hosted in Fossil itself and the Fossil homepage is actually just the Fossil repository itself.
BTW: even if you don't end up using Fossil, just spend some time learning its concepts. It's a rather brilliant design, and you're probably going to learn something which you can apply even if you are using Trac, Git, Instiki or whatever.
You might look at redmine.org, I'm just getting familiar with it, having only used it on a project for a couple months, but liking it so far.
If you're willing to tolerate closed source FogBugz is pretty good. http://www.fogcreek.com/FogBUGZ/
They'll let you test it for up to 2 people and if you decide you like it you can either licence space on their servers or purchase to run on your servers.
If you're an open source only kind of guy, I recommend diversifying. Get a couple different pieces of software to do the different things you want. Often times things like SVN will have post commit scripts to link your commits to your wiki or bug tracking, etc.
Its nice when things are bundled, but nicer when you can pick and choose the things you want.
Trac does all of these things.
If you really like the Google Hosting App, you might find InDefero the right choice for you.
I like Assembla.
FogBugz is pretty slick. I've been using for a month and really like it. It has a SCM plugin.
Do you really need all three solutions (SCM, bug tracking, and wiki) in one solution? Why not mix and match the solutions that work best for you?
I've never used Trac, but bugzilla works really well as a free bug tracker. There are lots of open source wikis out there, and for free SCMs, mercurial, git and subversion are all excellent choices.
For paid solutions, Atlassian Jira and Confluence (task tracking and wiki) are okay, but FogBugz is better. Perforce is IMHO the best non-free SCM out there.
Did someone mention Indefero? Looks nice enough so non-techs wont be scared to use it, open source version, private projects... Git support, issue tracker... seems like a good solution.
I'll have to go with echoesofspring on this one. Redmine looks to be a great system as issue tracking/ project management tool if you want to:
1. manage multiple projects with sub-projects
2. project/ task status transparency with clients or project managers
3. repository integration (I haven't used it)
4. Gant charts and calendars and more...
I chose it from this [wiki list of project management tools] :[1]http://en.wikipedia.org/wiki/Comparison_of_project_management_software#!

Resources