[Grml-devel] Working with git and sending in patches
Tong Sun
suntong at cpan.org
Mon Jun 7 02:56:19 CEST 2010
Hi,
Just trying to put all jigsaw puzzle together here. Please correct me if I'm
wrong.
First of all, philosophy for version control with git:
. While developing, small/independent commits are good thing, so that it's
easy to decouple different changes.
. But when integrating something in a main branch, commits should contain
all
logical/related changes.
Steps (using grml-debootstrap as an example):
- do initial git pull into grml-debootstrap
git pull git://git.grml.org/grml-debootstrap master
- Go into grml-debootstrap and start a new branch
git checkout -b t/my-working-branch
- work on the code, commit, hack, commit, hack, commit -- commit often &
commit small
- when AOK and need to integrate patches into main branch, squash all
patches into one
git rebase -i origin/master
- send in patches via email (to grml-devel at ml.grml.org)
git format-patch origin
git send-email --to grml-devel at ml.grml.org ...
Please correct me if anything above is wrong.
Now, question, having following the above, I am having problem pulling in
the latest master from head:
$ git pull
[ . . . ]
You asked me to pull without telling me which branch you
want to merge with, and 'branch.t/apt_cache.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
$ git pull git://git.grml.org/grml-debootstrap master
More information about the Grml-devel
mailing list