Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:: [': 0.04; 'newbie': 0.05; 'subject:Question': 0.07; 'committing': 0.09; 'git': 0.09; 'cc:addr:python-list': 0.11; 'missed': 0.12; 'changes': 0.15; 'doing,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'sorting': 0.16; 'subject:branches': 0.16; 'applies': 0.16; 'wrote:': 0.18; 'cheap': 0.19; 'commit': 0.19; 'possible,': 0.19; 'thu,': 0.19; 'subject:] ': 0.20; 'cc:addr:python.org': 0.22; 'lets': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; '[1]': 0.29; 'am,': 0.29; 'topic': 0.29; 'message- id:@mail.gmail.com': 0.30; 'work.': 0.31; 'that.': 0.31; '"do': 0.31; 'implied': 0.31; 'sep': 0.31; 'maybe': 0.34; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'should': 0.36; 'branch': 0.38; 'does': 0.39; 'voice': 0.60; 'full': 0.61; 'entire': 0.61; "you're": 0.61; 'making': 0.63; 'hear': 0.63; 'more': 0.64; 'frank': 0.68; 'price': 0.69; 'wish': 0.70; 'power': 0.76; 'control;': 0.91; 'discipline': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=YsNiJTftINRmsWvOTqz19B05E0C48CeFJevjDb1+q4A=; b=eLA2KRtdw4cAuyIjtgWL+R6ddsARmwBzs4NDH/DIO8AN2RfI75WSF7DXXGXUt1+te4 pE94/imE9MMYvPztO/nk5gb8Mhtcl8GFCjyCo6ZmweNsz36ynm2QFjQskIaM7fUAdgqC 3zIpLnISOZ6A1/cCtIyHo/KYcRKpgP+w+h7A/h+P8zDLEwi7+Q3H1IQ0gNAxDzE7yxiV noAsUwDOhvKV7jNaU5YvudLcFzOsVg9+aI3nw4aHrv8ZniCpUOLQ83th9EQlMy+q8msE hRDYNmU7c5uVmfaxkayvCNGMNBeO/LfqAJ6WzdsOuv/pXi4U/6tqOBwgzciQY2PzmJnK cY5Q== MIME-Version: 1.0 X-Received: by 10.43.96.65 with SMTP id cf1mr6410660icc.26.1410969655866; Wed, 17 Sep 2014 09:00:55 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Sep 2014 02:00:55 +1000 Subject: Re: [OT] Question about Git branches From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410969658 news.xs4all.nl 2895 [2001:888:2000:d::a6]:40568 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77974 On Thu, Sep 18, 2014 at 1:52 AM, Frank Millman wrote: > 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. No, it's more implied in "Do some work". Basically, what you should be doing, as much as possible, is making changes and immediately committing them. This applies to all forms of source control; once you're done sorting everything out, you can then squash the entire topic branch into a single commit that you put onto the main branch, or you can keep the full history (I prefer to do the latter). All magic comes at a price [1], and the price of the time travel that git lets you do is the discipline of making frequent commits while you work. As I see it, that's pretty cheap for the power you get :) [1] You're welcome to hear that in the voice of Rumpelstiltskin if you wish ChrisA