Robert Goldman <rpgold...@real-time.com> writes:

> A quick follow-up --- I got into trouble by sending patches computed
> versus origin/master.  It turns out that this is not what I (or anyone
> else, I would have thought) wants.  What I want is to get patches
> relative to the merge commit that brings together my local commits and
> origin/master.  Is there a common way to encourage git to do that?

Hi Robert.

Just as a quick test I branched 10 commits back in origin/master
with

git checkout -b foo origin/master~10

and then created a couple of throw-away commits for format-patch to play
with (by editing and committing lisp/ChangeLog)

My history now looks something like this:


 o -- o -- B -- o -- o -- o -- ... -- o -- o -- A origin/master
            \
             X -- Y  foo

>From anywhere in the history I can do

git format-patch origin/master..foo

and I get only the X and Y commits created as patches.  You can
experiment with the git log command instead of format-patch to show the
commits you get.  Basically it lists the commits not in origin/master on
the foo branch.

If you happen to be at foo (commit Y) you can omit the second branch
name since HEAD is assumed so origin/master..foo is the same as
origin/master..

HTH,

Bernt


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to