[OT] Question about Git branches

Chris Angelico rosuav at gmail.com
Wed Sep 17 18:00:55 CEST 2014

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


More information about the Python-list mailing list