On 9/12/07, Nicholas Blatter <[EMAIL PROTECTED]> wrote: > > On 9/12/07, Andrew McNabb <[EMAIL PROTECTED]> wrote: > > So far, my favorite feature of Git, compared to other distributed > > version control systems, is the way it does branching (note that > > Mercurial does it the same way). > > Color me newb but branching is one part of version control that I've > not done much with so maybe somebody can explain it a little. Albeit > pretty much all the projects I've ever used svn on I have been the > sole developer, but from what I know about branching it doesn't seem > like you would use it that much. In my repos I pretty much stay in > the /trunk. > > I hope nobody minds the out-of-the-blue question, but it's something > I've wondered for a while now. If this is the kind of question that > warrants a new thread just let me know :)
Branching allows you work on new features and do incremental check-ins without worrying about breaking your main always-working code base. A simple example: I keep my little family website under revision control. The files accessed by the webserver are a working directory (I think I'm using bzr for it at the moment). When I want to make a quick change, sure I can edit the files right there in place, but even that can be a problem. So for most changes, I first make a branch, then do my changes and testing in there. I can check in work as I go and not worry about breaking the main code. Then when it's all working, I merge the change into the main branch. At work we have a similar strategy. We have around 20 developers writing firmware. The main branch is always working. You can always grab code from the main branch and it will compile and run your printer. We all make changes on branches. When the changes are good and cooked, then we merge into the main branch. This way we don't bother other developers, or the ME's and EE's who are also using our code. We actually have several "main" branches (kind of a branch off of a branch off of a branch scenario) for different prototype printer versions that we are developing with at the moment. It's very useful for us. They way CVS and Subversion work, you are actually working on a branch all the time, you just don't realize it. Your working directory is a branch off of the main code. Your changes there don't affect the main codebase until you merge (commit) your code back into the repository. The problem is, you don't get any incremental checkin's with your working directory. Bryan -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/mailman/listinfo/uug-list
