On Samstag, 27. Juli 2013 06:30:11 CEST, Lindsay Mathieson wrote:
I've made changes in a private branch and and want to create a
diff to submit
for application against master. Would this be the correct command?
git diff master..my-branch
Not trivially.
Master might have progressed and differs from "my-branch"
You'll then spam your patch with reverting all the stuff that has meanwhile
been changed in master.
-> First rebase your branch on (origin/)master, then the above will get you a clean diff
of your local changes on top of "some" origin/master commit.
In general it's
git diff [[<OLD_commit_hash_or_symbol>] <NEW_commit_hash_or_symbol>]
the ".." are a synonym form i personally don't like too much, but allow you to
"spare" HEAD on either side.
post-review is nice for uploading, but of course you've always to define what
content you want to upload and of course this can always be automized for
certain workflows, eg. to always post the current branch (on top of master) like
git rebase master
git diff master
(have a clean diff from current branch HEAD to master HEAD)
or to post several reviews for single commits (what can be a lot of work since
you'll have to pass a base patch to glue them to some origin commit)
Cheers,
Thomas
Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<