[Buildroot] [PATCH 1/1] package/python-aiohttp-security: new package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Dec 7 08:59:06 UTC 2018


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


More information about the buildroot mailing list