Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'read.': 0.03; 'subject:: [': 0.04; 'newbie': 0.05; '"""': 0.07; 'subject:Question': 0.07; 'branching': 0.09; 'merging': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'stack,': 0.09; 'steps:': 0.09; 'missed': 0.12; 'wrote': 0.14; 'changes': 0.15; 'information]': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'record,': 0.16; 'subject:branches': 0.16; 'commit': 0.19; 'working.': 0.19; 'subject:] ': 0.20; 'input': 0.22; 'example': 0.22; 'merge': 0.24; 'typical': 0.24; 'initial': 0.24; 'push': 0.26; 'switch': 0.26; 'tutorials': 0.26; 'header:X-Complaints- To:1': 0.27; 'that.': 0.31; 'implied': 0.31; 'writes:': 0.31; 'critical': 0.32; 'another': 0.32; 'maybe': 0.34; 'advice': 0.35; 'but': 0.35; 'add': 0.35; 'really': 0.36; 'revert': 0.36; 'useful': 0.36; 'thanks': 0.36; 'branch': 0.38; 'to:addr:python- list': 0.38; 'issue': 0.38; 'does': 0.39; 'quote': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'new': 0.61; 'world.': 0.61; 'simple': 0.61; "you're": 0.61; 'back': 0.62; "you'll": 0.62; 'story': 0.63; 'real': 0.63; 'valuable': 0.63; 'production': 0.68; 'frank': 0.68; 'production.': 0.68; 'pro': 0.69; 'receive': 0.70; 'from.': 0.93; 'scott': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Frank Millman" Subject: Re: [OT] Question about Git branches Date: Wed, 17 Sep 2014 17:52:40 +0200 References: X-Gmane-NNTP-Posting-Host: 197.86.223.142 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.4657 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410969172 news.xs4all.nl 2870 [2001:888:2000:d::a6]:36107 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77972 "Sergey Organov" wrote in message news:lvbtd2$fsg$1@speranza.aioe.org... > "Frank Millman" writes: >> Hi all >> [snip lots of really valuable information] > Thanks a stack, Sergey, that is a really useful explanation. For the record, this is where my initial confusion came from. The following quote comes from the book Pro Git, by Scott Chacon. It is typical of the advice found in other tutorials and notes I have read. """ Let's go through a simple example of branching and merging with a workflow that you might use in the real world. You'll follow these steps: 1. Do work on a web site. 2. Create a branch for a new story you're working on. 3. Do some work in that branch. At this stage, you'll receive a call that another issue is critical and you need a hotfix. You'll do the following: 1. Revert back to your production branch. 2. Create a branch to add the hotfix. 3. After it's tested, merge the hotfix branch, and push to production. 4. Switch back to your original story and continue working. """ Nowhere does it state that you must commit or stash your current changes before switching branches. Maybe it is implied by 'revert', but as a newbie I had missed that. With your help and input from others, I have a much better understanding now. Frank