User Tools

Site Tools


zh-cn:doc:patch:using.git

Using GIT

Git is the recommended way as it makes it quite easy to create and send working patch emails, but you are not required to use it.

b) Can I submit a patch against HEAD on a branch (e.g. 14.07) or only
against trunk?

Patches should be against trunk and will be backported to affected branches if needed. If the issue only affects the branch, then a patch against the branch is fine. This is to ensure that fixes can't get “lost” in a branch.

c) Which commands of the many possible git permutations should I use the
generate the patch ?

git format-patch is what I use.

My workflow is basically (for a single patch)

a) edit stuff
b) ensure it compiles
c) git add <modified/new files>
d) git commit -s
e) <add proper subject in first line, empty line, commit message>
f) git show -1 (to review the patch)
g) git format-patch -1
h) scripts/checkpatch.pl 0001-*
i) git send-email --to=... --cc=... 0001-*

for patch series, do a to f accordingly, then git format-patch -<x>, where x = number of patches, or <rev> (maybe also a –cover-letter), then send the patch series.

zh-cn/doc/patch/using.git.txt · Last modified: 2016/10/02 15:29 by leangjia