git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ib@wupperonline.de (Ingo Brueckl)
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org
Subject: question concerning branches
Date: Thu, 20 Aug 2009 14:46:00 +0200	[thread overview]
Message-ID: <4a8d4583@wupperonline.de> (raw)
In-Reply-To: <alpine.LFD.2.01.0908191441070.3158@localhost.localdomain>

Linus Torvalds <torvalds@linux-foundation.org> writes:

> branches have always been pointers to the top-of-commit

Obviously I expected them to be pointers on trees.

A kind of automatical starting commit in a newly created branch would at
least warn if one has begun changing files and wants to checkout back.
(Is this a feature worth of discussion?)

> the git behavior explicitly _encourages_ you to not have to decide
> before-the-fact to create a branch

Thanks for the explanation which help me to understand why git works like it
does.

I'm able to follow your examples, but what I had it mind when I started the
topic and my example was:

Assume a project is released (i.e. no more open bugs we know about) - I know
we're drifting towards fantasy now. ;-)

On the one hand, I want to add single new features (such as other developers
do) which will be written, tested and committed. I want to push/pull
frequently to be up to date all the time. (master branch)

On the other hand, I want to completely rewrite the core of the program.
(test or rewrite branch)

What is the git way to do this in a the right (and clever) manner?

In a branch, I learned, I have to commit or stash before I return to master
for push/pull to follow the project. If I forget, I'm screwed, because files
have changed due to the rewrite (in that branch), I won't get a warning until
my first commit (in that branch) and commits (in master) will conflict.

Ingo

  parent reply	other threads:[~2009-08-20 12:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 17:33 question concerning branches Ingo Brueckl
2009-08-19 18:07 ` Bruce Stephens
2009-08-19 18:07 ` Avery Pennarun
2009-08-19 18:31   ` Ingo Brueckl
2009-08-19 19:08     ` Jakub Narebski
2009-08-19 19:45       ` Ingo Brueckl
2009-08-19 19:50         ` Avery Pennarun
2009-08-20  7:57           ` Matthieu Moy
2009-08-19 19:53         ` Jacob Helwig
2009-08-19 20:01         ` Jakub Narebski
2009-08-19 20:39         ` Theodore Tso
2009-08-19 20:57           ` Jakub Narebski
2009-08-20 17:37             ` Theodore Tso
2009-08-19 21:51         ` Linus Torvalds
2009-08-20  3:01           ` Randal L. Schwartz
2009-08-20 12:46           ` Ingo Brueckl [this message]
2009-08-20 13:47             ` Johannes Sixt
2009-08-20 14:59               ` Jakub Narebski
2009-08-19 18:35 ` Junio C Hamano
2009-08-19 19:21   ` Ingo Brueckl
2009-08-20  7:33     ` Andreas Ericsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a8d4583@wupperonline.de \
    --to=ib@wupperonline.de \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).