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


Groups > comp.lang.python > #77974

Re: [OT] Question about Git branches

References <mailman.14043.1410848545.18130.python-list@python.org> <lvbtd2$fsg$1@speranza.aioe.org> <lvcao3$rll$1@ger.gmane.org>
Date 2014-09-18 02:00 +1000
Subject Re: [OT] Question about Git branches
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14082.1410969658.18130.python-list@python.org> (permalink)

Show all headers | 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