From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] How to contribute to Buildroot with Git
Date: Sun, 5 Dec 2010 09:17:24 +0100 [thread overview]
Message-ID: <20101205091724.591e256b@surf> (raw)
In-Reply-To: <953244.140.qm@web111110.mail.gq1.yahoo.com>
On Sat, 4 Dec 2010 16:09:00 -0800 (PST)
Justin Mark <oilehus@yahoo.com> wrote:
> I can build libgee with buildroot in my workspace, how should I
> submit the patch for review? post the patch here or directly do it
> from git? Can someone give me some details since I don't know much
> about git?
The best is to use Git. Here is a simplified version of the Git workflow
that I use to work with Buildroot:
1) Clone (to be done only once)
git clone git://git.busybox.net/buildroot
2) Configure Git (to be done only once)
Then tell git who you are :
git config --global user.name "Firstname Lastname"
git config --global user.email firstname.lastname at somewhere.com
And tell git how to send emails :
git config --global sendemail.smtpserver mysmtpserver
And to avoid chained reply :
git config --global sendemail.chainreplyto false
3) Create a branch to work on your topic (to be done for every
separate topic you'd like to work with)
git checkout -b mytopic
Note that this also switches immediatly to the new 'mytopic'
branch. You can run 'git branch' at any time to know on which
branch you are.
4) Make some modifications, for one particuler subtopic (like adding
the vala compiler)
5) Commit those modifications
git commit -s -a
And enter an appropriate commit log.
If you created new files, add them with "git add".
Then go back to step 4 for the other changes you want to do, or
proceed to step 6 if you're done with your changes.
6) Review your changes
git log -p master..
7) Prepare patches for your changes
git format-patch HEAD
This will generate a set of 000X-*.patch files in the Buildroot
directory
8) Send your patches to the list
git send-email --to buildroot at uclibc.org --compose *.patch
And you're done.
If while reviewing your commits you find that you need to merge some of
them (because you did some mistakes that you fixed later and you don't
want the world to know about your mistakes), then you have to use the
rebasing feature of git:
git rebase -i master
Git will open up a text editor with the list of your commits. You can
edit this file to change the order of the commits, or to change the
action taken on a particular commit (see the file itself for
documentation on those actions). A typical thing is :
pick SOMEGITHASH package: add foobar
pick SOMEGITHASH package: add barfoo
pick SOMEGITHASH I did something wrong in add foobar, merge me
So obviously you want the last commit to be merged into the first one,
so that nobody knows you did some mistakes during your development. So,
turn those three lines into the following ones:
pick SOMEGITHASH package: add foobar
fixup SOMEGITHASH I did something wrong in add foobar, merge me
pick SOMEGITHASH package: add barfoo
And exit the text editor. Git will reorganize your commits, and you'll
end up with just two commits.
Don't hesitate to ask questions if you have issues,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2010-12-05 8:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 5:39 [Buildroot] DConf Justin Mark
2010-12-03 10:35 ` Thomas Petazzoni
2010-12-05 0:09 ` Justin Mark
2010-12-05 0:38 ` Lionel Landwerlin
2010-12-05 0:50 ` Justin Mark
2010-12-05 8:03 ` Thomas Petazzoni
2010-12-05 8:17 ` Thomas Petazzoni [this message]
2010-12-05 8:23 ` [Buildroot] How to contribute to Buildroot with Git Paul Jones
2010-12-05 14:26 ` Heiko Zuerker
2010-12-05 14:41 ` Thomas Petazzoni
2010-12-05 14:54 ` Heiko Zuerker
2010-12-05 21:23 ` Peter Korsgaard
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=20101205091724.591e256b@surf \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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