Quick Git Guide, for myself whenever I forget stuff

Git+Svn

Clone

git svn clone <svn url>

Generate .gitignore

git svn show-ignore > .gitignore

Rebase

git svn rebase

Patch Bomb E-Mail

Preparation

Verify git has your e-mail configured correctly

Generate Changes

Add New File

Finished a 'Change'

Rinse, Repeat

Generate nicely formatted e-mailable files

git format-patch -s --subject-prefix='FOO'

-s

add signed-off-by

--subject-prefix='FOO'

Subject [FOO] blah blah blah

-n

number patches - good for sets

-N

don't number patches - one-off fix

-M

detect renames

-C

Find Copies - Use twice if original is not modified (VERY VERY SLOW)

-b/-w

Ignore whitespace changes/ignore ALL whitespace

-o <dir>

store patches here

--cover-letter

Generates a cover letter 0/M file -- Remember to edit it

Generally:

mkdir Patchbomb
git format-patch --subject-prefix='FOO' -o Patchbomb/ -b deadbeefdeadbeefdeadbeefdeadbeefdeadbeef --cover-letter

E-Mail from git

Edit Patchbomb/0000-cover-letter.patch

git send-email --dry-run --to="foo@bar.baz" Patchbomb
git send-email --to="foo@bar.baz" Patchbomb

Other/GitTricks (last edited 2010-04-29 18:41:04 by PatErley)