Skip to content

Commit

Permalink
Reordered analogies in "Work How You Want"
Browse files Browse the repository at this point in the history
Minor edits
  • Loading branch information
Ben Lynn authored and Ben Lynn committed Sep 8, 2007
1 parent 5aff9c9 commit 1db41d7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Interrupting your train of thought can be detrimental to your productivity, and

But cloning still entails copying the whole working directory as well as the entire history up to the given point. Even though Git reduces the cost of this with file sharing and hard links, the project files themselves must be recreated in their entirety in the new working directory.

*Solution*: Git has a better tool for these situations that is much faster and more space-efficient than cloning: *git-branch*. With this magic word, the files in your directory suddenly shapeshift from one version to another. This transformation can do more than merely go back or forward in history. Your files can morph from the last release to the experimental version to the current development version to your friend's version and so on.
*Solution*: Git has a better tool for these situations that is much faster and more space-efficient than cloning: *git-branch*.

With this magic word, the files in your directory suddenly shapeshift from one version to another. This transformation can do more than merely go back or forward in history. Your files can morph from the last release to the experimental version to the current development version to your friend's version and so on.

== The Boss Key ==

Expand Down Expand Up @@ -79,7 +81,7 @@ Then once you've fixed the bug:

== Uninterrupted Workflow ==

Some projects require your code to be reviewed before you may submit it. To make life easier for those reviewing your code, if you have a big change to make you might break it into two or more parts, and get each parts separately reviewed.
Some projects require your code to be reviewed before you may submit it. To make life easier for those reviewing your code, if you have a big change to make you might break it into two or more parts, and get each part separately reviewed.

What if the second part cannot be written until the first part is approved and checked in? In many version control systems, you'd have to send the first part to the reviewers, and then wait until it has been approved before starting on the second part.

Expand Down Expand Up @@ -124,11 +126,11 @@ The branch command can also do other operations with branches. See *git help bra

== Work How You Want ==

Several Linux window managers allow you to have multiple desktops, which means you can instantly view a different state of the desktop. Git branching is like multiple desktops for your working directory. Continuing this analogy, Git cloning is like attaching another monitor on which you can open more windows.
Applications like [[http://www.mozilla.com/][Mozilla Firefox]] allow you to open multitple tabs and multiple windows. Swtiching tabs gives you different content in the same window. Git branching is like tabs for your working directory. Continuing this analogy, Git cloning is like opening a new window. Being able to do both easily makes for a better user experience.

Perhaps a better example is the [[http://www.gnu.org/software/screen/][*screen*]] utility. This gem allows you to create, destroy and switch between multiple terminal sessions in the same terminal. Instead of opening new terminals (clone), you can use the same one if you run *screen* (branch). In fact, you can do a lot more with *screen* but that's a topic for another day.
On a higher level, several Linux window managers allow you to have multiple desktops, which means you can instantly view a different state of the desktop. This is similar to branching in Git, whereas Git cloning would be like attaching another monitor where you can open more windows.

Web browsers like [[http://www.mozilla.com/][Mozilla Firefox]] allow you to open multitple tabs and multiple windows which are analogous to branching and cloning in Git. Being able to do both easily makes for a better user experience.
Yet another example is the [[http://www.gnu.org/software/screen/][*screen*]] utility. This gem allows you to create, destroy and switch between multiple terminal sessions in the same terminal. Instead of opening new terminals (clone), you can use the same one if you run *screen* (branch). In fact, you can do a lot more with *screen* but that's a topic for another day.

Cloning, branching and merging are fast and local in Git, encouraging you to use the combination that best suits you. Git allows you to work exactly how you want.

Expand Down

0 comments on commit 1db41d7

Please sign in to comment.