All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/python-aiohttp-security: new package
Date: Fri, 7 Dec 2018 09:59:06 +0100	[thread overview]
Message-ID: <20181207095906.7d21323e@windsurf> (raw)
In-Reply-To: <CADvTj4qArP_W_5qb=RyYTnhRe0iyLXhR=vcAajGSx+aHUaarLQ@mail.gmail.com>

Hello James,

On Fri, 7 Dec 2018 01:48:00 -0700, James Hilliard wrote:

> Ok, will try and do that in the future. I was keeping them in separate
> branches so that they are easier to amend.

You can keep them in the same branch, and still amend them very easily.
The magic thing is "interactive rebase".

Let's explain quickly how it works:

$ git checkout -b foo # create a new branch to work
add package foo1
$ git commit -as -m "foo1: new package"
add package foo2
$ git commit -as -m "foo2: new package"
add package foo3
$ git commit -as -m "foo3: new package"

No, you want to do some changes. You can do them right there in your
code base. Let's say you fixed one thing in package foo1 and one thing
in package foo2. Then you do:

$ git add package/foo1/
$ git commit -m "merge this with foo1"
$ git add package/foo2/
$ git commit -m "merge this with foo2"

And now, the magic:

$ git rebase -i HEAD~5

It opens up a text editor. You move the line "merge this with foo1"
right after the "foo1: new package" line, and change the "pick" word by
"fixup". You do the same with "merge this with foo2", and exit the text
editor. And voila.

Additional tips:

 - With proper commit titles, you can actually have git rebase -i
   automatically do the fixups.

 - You can also directly edit commits by changing the "pick" by an
   "edit".

I encourage you to read about "interactive rebase" in general. It's
going to change your life of patch preparation :-)

Another unrelated tip: please don't top post. Always write your replies
*below* the text you're replying to. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2018-12-07  8:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 23:33 [Buildroot] [PATCH 1/1] package/python-aiohttp-security: new package james.hilliard1 at gmail.com
2018-12-07  8:05 ` Yegor Yefremov
2018-12-07  8:16   ` James Hilliard
2018-12-07  8:46     ` Thomas Petazzoni
2018-12-07  8:48       ` James Hilliard
2018-12-07  8:56         ` Yegor Yefremov
2018-12-07  8:59         ` Thomas Petazzoni [this message]
2018-12-07  9:13           ` James Hilliard

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=20181207095906.7d21323e@windsurf \
    --to=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.