• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 720
  • Last Modified:

Running GIT on Lion, for Xcode

From what I understand, the latest Xcode has GIT. I installed Xcode over the weekend.

How do I use GIT? Is it a complete install that came with Xcode? It seems I can use it from Xcode. How does that work? I am pretty sure I saw a demo that shows using Xcode to compare versions of the same file. What other features are there for managing source code?

What limitations are there?
How does it compare to SubVersion?
Can I make branches off of the trunk?

Thanks!
0
newbieweb
Asked:
newbieweb
  • 2
  • 2
2 Solutions
 
eagerCommented:
There are many tutorial about git online.  Here's one listing of several :  http://sixrevisions.com/resources/git-tutorials-beginners/

Git is a distributed version control system, with extensive functionality (and some amount of complexity). You can create branches (easily and quickly) as well as sub-projects and much more.

Subversion has a central repository.  Git has no central repository; each installation is free-standing and complete, although likely linked to a parent.  Git is better compared to Mercurial and BitKeeper than Subversion.
0
 
newbiewebAuthor Commented:
So multiple developers can cooperate on a project. How do they share their work? Is there a "trunk" or a "latest version"?

How could I back it up unless I could get everything on one machine?
0
 
eagerCommented:
Your questions come from familiarity with a centralized repository system such as Subversion, CVS, Perforce, etc.  A distributed SCM is different and it takes a bit of time and study to alter the way that you look at source code management.  Read the tutorials.

Each developer has his/her own repository for a project, derived from another repository for the project.  This is similar to the working directory for a Subversion project, except it is complete. You can do anything with the repository, such as branching, merging, tagging, or committing patches, just like Subversion, except that you don't need a separate repository which you interact with.  Git has functions which allow sharing patches, merging from one repository to another, or updating a repository to include changes made in another.  

There are several ways to share work.  Perhaps the most common is to pull patches from one repository to another.  Other ways are to push patches from a repository to a parent repository or create a patch which can be applied to another repository.  

Each repository is independent and can have it's own trunk and branches.  There is a latest version, but that only has meaning for a specific repository.  For example, there is a trunk (named master) for the Linux kernel at kernel.org, but there is a different trunk for various clones of the kernel.org repo.  Git has functionality which supports exchanging patches between repositories with common origins.

Backing up a git repo can be done by making a copy (e.g., using tar) or by cloning it, creating a new and equivalent repository.
0
 
newbiewebAuthor Commented:
Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now