Information Technology Reference
In-Depth Information
Branching a project
A branch is a parallel development track. When you create a branch, Git copies the current project and creates
an independent version. Editing one branch leaves other branches unchanged. When you select a branch,
Xcode loads the files from that branch and displays them for editing.
It's important to understand that you can only edit one branch at a time. When you select a different branch,
Xcode loads all of the files from that branch. Changing branches can literally switch the contents of every file in
a project.
This can be a useful thing. But there are a couple of potential gotchas to be aware of:
The editor doesn't give you any indication of which branch is being edited. The Organizer is the only
way to see which branch is active.
The editor doesn't include branch switching. Again, you can only switch branches in the Organizer.
Because of these limitations, branch management can seem more like an afterthought than an essential part of
the development process. This is unfortunate, because it can be a very powerful and useful tool.
In a team context, branching is often used for independent development of unrelated features. Branching allows
each team or individual to work with a fixed version of the code that surrounds the feature they're working on.
As a solo developer, you can use branching for version management. If you create a branch for each version in-
stead of using the commit system to manage versions, you can restore every file in the project to an earlier state
quickly and easily, by selecting its branch.
Search WWH ::




Custom Search