[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
>From git://git.grml.org/grml-debootstrap
* branch master -> FETCH_HEAD
Auto-merging chroot-script
CONFLICT (content): Merge conflict in chroot-script
Auto-merging cmdlineopts.clp
CONFLICT (content): Merge conflict in cmdlineopts.clp
Auto-merging config
Auto-merging grml-debootstrap
CONFLICT (content): Merge conflict in grml-debootstrap
Auto-merging grml-debootstrap.8.txt
Automatic merge failed; fix conflicts and then commit the result.
So,
- what's the normal steps here to pulling in the latest master from head?
- how to solve the above specific problem? I'm thinking just to abandon this
directory and pull from git from scratch again.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ml.grml.org/pipermail/grml-devel/attachments/20100606/26cc4325/attachment.html>
More information about the Grml-devel
mailing list