git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git Vs. Svn for a project which *must* distribute binaries too.

From
JHJan Hudec <bulb@ucw.cz>
Date
Jun 8, 2007, 20:41 UTC
Message-ID
<20070608204101.GA4084@efreet.light.src>
In-Reply-To
<20070607165150.27434.qmail@science.horizon.com>
On Thu, Jun 07, 2007 at 12:51:50 -0400, linux@horizon.com wrote:
Show 14 quoted lines
> 3) Branches are your friend.  CVS users think branches are a big
>    deal and require careful thought and planning.  Git users branch
>    almost as often as CVS users commit.  A typical "big change"
>    that might be a single commit in CVS would be a branch of
>    several commits in git.
> 
>    In fact, a good piece of advice is to NEVER commit directly
>    to your trunk ("master").  Do ALL development on branches, and
>    merge them into the trunk.
> 
>    I cheat on that a lot, but I also know how to fix things if I get
>    caught becauee a quick hack is proving not so quick: add a branch
>    reference to the tip I'm developing on and then back up the master
>    branch to where I should have left it when I started this project.

There is a big difference between the cvs and subversion notion of branches and the git one, which make branches so much more friendly in git.

In cvs and subversion, branch name is part of the commit identity, so you have to create it before you commit and it will stay with you forever. That means you have to plan the branch, because there's no going back.

On the other hand git branch (head) names are just pointers to revisions you base your work on. You can add branch name after you commit, you can rename the branch anytime and you can delete branches that are no longer interesting, either because they are already merged, or because they didn't work out. That means you don't have to think twice whether you need a branch before you commit, since you can always change your mind later.

This makes it possible to use heaps of short-lived branches for experimenting and to give them silly names, because noone cares if you don't publish them, which you don't need to do and ususally won't do until you are confident that you are working in the right direction (at which point you have much better idea about what name to publish them under).

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: linux@horizon.com
Message 4 of 4 in “Re: Git Vs. Svn for a project which *must* distribute binaries too.”
  1. linux@horizon.comJun 7, 2007
  2. Bryan ChildsJun 7, 2007
  3. linux@horizon.comJun 7, 2007
  4. Jan HudecJun 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.