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


Groups > comp.lang.python > #77915

[OT] Question about Git branches

From "Frank Millman" <frank@chagford.com>
Subject [OT] Question about Git branches
Date 2014-09-16 08:22 +0200
Newsgroups comp.lang.python
Message-ID <mailman.14043.1410848545.18130.python-list@python.org> (permalink)

Show all headers | View raw


Hi all

I know there some Git experts on this list, so I hope you don't mind me 
posting this question here.

I am slowly getting comfortable with Git, but there is something that 
confuses me.

You are encouraged to make liberal use of 'branches', and if required you 
can have multiple branches running concurrently. When you commit changes on 
one branch, those changes are not visible to other branches until you merge, 
so each branch can be worked on independently.

However, if you are working on a branch and make some changes, those changes 
are visible to *all* branches until you commit. If you run 'git status' from 
any branch, you can see all files that have been modified or added.

It seems to me that this can be confusing. When you are ready to commit 
changes on one branch, you have to -
  - check that it is the currently checked-out branch, which is not always 
obvious
  - choose which altered files you want to add to the staging area
  - stage them and then commit

This seems error-prone. Am I missing something?

Frank Millman


Back to comp.lang.python | Previous | NextNext 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