Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Steinar Bang <sb@dod.no>
To: gdb@sources.redhat.com
Subject: Re: GIT and CVS
Date: Fri, 11 Nov 2011 21:00:00 -0000	[thread overview]
Message-ID: <87bosi5qts.fsf@dod.no> (raw)
In-Reply-To: <201110141022.p9EAMrUN030848@glazunov.sibelius.xs4all.nl>

>>>>> Mark Kettenis <mark.kettenis@xs4all.nl>:

> I'm a git hater.  And the reason I hate GIT is because of the
> development model it enforces.  It doesn't match the way I work.  My
> workflow looks more or less as follows:

> $ cvs update
> (make some changes)

git pull
make some changes

(or better:
 git pull
 make some changes and commit them)

> ...
> (come back a couple of days later)
> $ cvs update
> (merge conflicts, make some more changes)

git stash
git pull
git stash pop
(fix merge conflicts with the stash pop, make some more changes)

(or better:
 a) git pull
    (fix merge conflicts, make more changes and commit them)
 b) git pull --rebase
    (fix merge conflicts, make more changes and commit them)

> ...
> $ cvs update
> (test changes, write changelog, send diff for review)

git stash
git pull
git stash pop
(test changes, write changelog, send diff for review)

(or better:
 a) git pull
    (test changes, write changelog, send diff for review)
 b) git pull --rebase
    (test changes, write changelog, send diff for review)

> ...
> $ cvs update
> (test changes again, fixup changelog)

git stash
git pull
git stash pop
(test changes again, fixup changelog, commit)

(or better:
 a) git pull
    (test changes again, fixup changelog, commit)
 b) git pull --rebase
    (test changes again, fixup changelog, commit)

> $ cvs commit

git push.

Note to the following: using "git stash" lets you avoid having commits
for your changes, but
 1. that gives more commands for updates
 2. having fine grained commits helps the git merge magic

So the git way is to have fine grained commits.  That works for me,
because that's the way I used to prefer to stage my CVS checkins.  And
when working with continous integration server, that was always a pain.

With git I can have that, and it's the "git push" that triggers the
build.

And if you use commits there are two ways you can "update":
 1. git pull
 2. git pull --rebase

"git pull" will merge your current changes with the upstream changes,
and they will become intermingled in the history.

"git pull --rebase" will update the workspace, and then re-apply all of
your commits to the rebase (giving them a new date).

I started out using git, doing "git pull --rebase" since this seemed
most familiar to me (I was used to CVS and then SVN).  But today I use a
different pattern: I use shortlived local feature branches, and make my
commits on them, and after they are merged into the tracking branch and
pushed, I can delete the feature branches.


  parent reply	other threads:[~2011-11-11 21:00 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 19:37 Phil Muldoon
2011-10-13 20:21 ` Joseph S. Myers
2011-10-13 20:55   ` Phil Muldoon
2011-10-13 21:33     ` DJ Delorie
2011-10-13 21:44       ` Phil Muldoon
2011-10-13 21:43     ` Alfred M. Szmidt
2011-10-13 21:51       ` Jan Kratochvil
2011-10-13 22:08         ` Eli Zaretskii
2011-10-13 22:25           ` Jan Kratochvil
2011-10-13 22:41             ` Alfred M. Szmidt
2011-10-13 22:44             ` Alfred M. Szmidt
2011-10-14 10:31             ` Eli Zaretskii
2011-10-13 22:19         ` Alfred M. Szmidt
2011-10-13 22:45           ` Jan Kratochvil
2011-10-13 23:37             ` Alfred M. Szmidt
2011-10-14  5:56               ` Jan Kratochvil
2011-10-14  6:51                 ` Alfred M. Szmidt
2011-10-13 23:03       ` Phil Muldoon
2011-10-13 23:51         ` Alfred M. Szmidt
2011-10-14  6:01           ` Jan Kratochvil
2011-10-14  6:52             ` Alfred M. Szmidt
2011-10-14  7:01               ` Jan Kratochvil
2011-10-14  7:13                 ` Alfred M. Szmidt
2011-10-14 15:39                 ` Joseph S. Myers
2011-10-14 15:49                   ` Jan Kratochvil
2011-10-13 21:51     ` Joseph S. Myers
2011-10-13 21:59       ` Jan Kratochvil
2011-10-13 22:08         ` Joseph S. Myers
2011-10-13 22:17         ` Eli Zaretskii
2011-10-14  5:03           ` Joel Brobecker
2011-10-14  8:04             ` Eli Zaretskii
2011-10-13 23:14       ` Phil Muldoon
2011-10-13 23:56         ` Joseph S. Myers
2011-10-14  6:04           ` Jan Kratochvil
2011-10-13 21:58 ` Eli Zaretskii
2011-10-13 23:20   ` Phil Muldoon
2011-10-14  8:13     ` Eli Zaretskii
2011-10-14 10:23       ` Mark Kettenis
2011-10-14 10:55         ` Eli Zaretskii
2011-10-14 14:09           ` Li, Rongsheng
2011-10-14 12:54         ` Jan Kratochvil
2011-10-14 13:07           ` Jonas Maebe
2011-10-14 14:26           ` Eli Zaretskii
2011-10-14 14:32             ` Jan Kratochvil
2011-10-14 15:05             ` Phil Muldoon
2011-10-14 15:21               ` Eli Zaretskii
2011-10-14 14:52         ` Phil Muldoon
     [not found]           ` <83zkh3k419.fsf@gnu.org>
2011-10-14 15:47             ` Jonas Maebe
2011-10-14 16:12             ` Andreas Schwab
2011-10-14 16:20             ` Andreas Schwab
2011-10-14 16:25               ` Eli Zaretskii
2011-10-14 17:06                 ` Matt Rice
2011-10-14 17:25                   ` Eli Zaretskii
2011-11-11 21:00         ` Steinar Bang [this message]
2011-11-12  8:30           ` Eli Zaretskii
2011-11-12 15:30             ` Steinar Bang
2011-10-14  5:10 ` Joel Brobecker
2011-10-14 15:38   ` Joseph S. Myers
2011-10-14 12:36 ` André Pönitz
2011-10-14 14:19   ` Eli Zaretskii
2011-10-14 15:02     ` Phil Muldoon
2011-10-14 15:16       ` Eli Zaretskii
2011-10-14 16:59     ` André Pönitz
2011-10-14 14:58   ` Phil Muldoon
2011-10-14 15:02     ` Paul_Koning
2011-10-16 15:04       ` Ralf Corsepius
2011-10-14 16:10     ` André Pönitz
2011-11-11 22:50 ` Pedro Larroy
2011-11-12  8:28   ` Steinar Bang
2011-11-13  0:05     ` John Hein
2011-11-15 15:02   ` Tom Tromey
2011-11-16 16:59     ` Christopher Faylor

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=87bosi5qts.fsf@dod.no \
    --to=sb@dod.no \
    --cc=gdb@sources.redhat.com \
    /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