Public Git repo
Jeff Kletsky
gnucash at allycomm.com
Mon Jan 10 12:55:41 EST 2011
On 01/10/2011 08:28 AM, Geert Janssens wrote:
> On Monday 10 January 2011, Jeff Kletsky wrote:
>> At least as I understand it, branches in git are nothing more than a
>> pointer to the "head" commit and, structurally, are pretty much the same
>> (if not identical) to tags. A branch in git is a tag on point in
>> development that is moved to other commits if you commit "to" that
>> branch. In simpler words, it is a tag that gets conveniently moved each
>> time you commit. You really aren't "working on/in a branch" but are more
>> moving what the notion of the head of the branch is. Yeah, it's really
>> different from svn that way.
>>
>> While there is the notion of "parent" and "child" commits (which can be
>> multiple) in git, one of the things that is different about git branches
>> is that there is no notion of a "branch point" or a "branch history" the
>> way there is in svn, for example. Sure, as long as you don't merge the
>> branch, you can determine where it diverges from another branch.
>> However, once you merge, that gets dicey to impossible.
> I don't know about the command line tools, but the graphical tool gitk seems
> to have no problems with that ? As far as I know it nicely shows where
> branches diverge and merge together again ?
>
> Perhaps you have a specific use case in mind that is easier to handle in svn
> that in git ?
>
> Geert
git and svn are just "different" on things
which is "better" depends on how you work
(that said, I personally prefer git for my local work)
1) You're somewhere along in development
- A - B - C
Branch 1 => C
2) You Create Branch 2
- A - B - C
Branch 1 => C
Branch 2 => C
3) Make some commits on Branch 2
- A - B - C - D - E - F
Branch 1 => C
Branch 2 => F
4) Make some commits on Branch 1
- A - B - C - D - E - F
\
\ G - H
Branch 1 => H
Branch 2 => F
5) Someone else makes a topic branch, Branch 3, off commit B
(maybe that was the last released version) and makes some commits
/ I - J
/
- A - B - C - D - E - F
\
\ G - H
Branch 1 => H
Branch 2 => F
Branch 3 => J
6) You merge in some of the changes from Branch 3 into Branch 2
/ I - J ------ \
/ \
- A - B - C - D - E - F - K
\
\ G - H
Branch 1 => H
Branch 2 => K
Branch 3 => J
Sooo, where is the "branch point" for Branch 2? Was it commit B or
commit C?
Also, from git's perspective, commmits I and J are just as much "on
Branch 2"
as are commits D, E, and F.
From svn's perspective, there was a branch made at point C
and some additional changes were introduced in commit K
When I remember, I tag the branch points when I make them.
More information about the gnucash-devel
mailing list