Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77974

Re: [OT] Question about Git branches

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 <rosuav@gmail.com>
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 <lvcao3$rll$1@ger.gmane.org>
References <mailman.14043.1410848545.18130.python-list@python.org> <lvbtd2$fsg$1@speranza.aioe.org> <lvcao3$rll$1@ger.gmane.org>
Date Thu, 18 Sep 2014 02:00:55 +1000
Subject Re: [OT] Question about Git branches
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14082.1410969658.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, Sep 18, 2014 at 1:52 AM, Frank Millman <frank@chagford.com> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[OT] Question about Git branches "Frank Millman" <frank@chagford.com> - 2014-09-16 08:22 +0200
  Re: [OT] Question about Git branches Marko Rauhamaa <marko@pacujo.net> - 2014-09-16 11:21 +0300
    Re: [OT] Question about Git branches Chris Angelico <rosuav@gmail.com> - 2014-09-16 18:29 +1000
      Re: [OT] Question about Git branches Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-16 22:14 +1000
        Re: [OT] Question about Git branches Chris Angelico <rosuav@gmail.com> - 2014-09-16 22:48 +1000
        Re: [OT] Question about Git branches Tim Delaney <timothy.c.delaney@gmail.com> - 2014-09-16 22:50 +1000
        Re: [OT] Question about Git branches Robert Kern <robert.kern@gmail.com> - 2014-09-16 17:08 +0100
        Re: [OT] Question about Git branches Chris Angelico <rosuav@gmail.com> - 2014-09-17 02:25 +1000
        Re: [OT] Question about Git branches Robert Kern <robert.kern@gmail.com> - 2014-09-16 20:11 +0100
        Re: [OT] Question about Git branches Tim Delaney <timothy.c.delaney@gmail.com> - 2014-09-17 11:47 +1000
    Re: [OT] Question about Git branches "Frank Millman" <frank@chagford.com> - 2014-09-16 10:59 +0200
      Re: [OT] Question about Git branches Sergey Organov <sorganov@gmail.com> - 2014-09-17 14:16 +0400
    Re: [OT] Question about Git branches Jason Swails <jason.swails@gmail.com> - 2014-09-16 09:19 -0400
      Re: [OT] Question about Git branches Marko Rauhamaa <marko@pacujo.net> - 2014-09-17 02:26 +0300
  Re: [OT] Question about Git branches Sergey Organov <sorganov@gmail.com> - 2014-09-17 16:04 +0400
    Re: [OT] Question about Git branches "Frank Millman" <frank@chagford.com> - 2014-09-17 17:52 +0200
    Re: [OT] Question about Git branches Chris Angelico <rosuav@gmail.com> - 2014-09-18 02:00 +1000

csiph-web