[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some more about Git usage (was: [PATCH] Don't abuse $(prefix) for findin

From: Thomas Schwinge
Subject: Some more about Git usage (was: [PATCH] Don't abuse $(prefix) for finding build-time files.)
Date: Fri, 19 Jun 2009 15:00:34 +0200
User-agent: Mutt/1.5.11


On Fri, Jun 19, 2009 at 12:21:17AM +0300, Sergiu Ivanov wrote:
> On Wed, Jun 17, 2009 at 12:40:56AM +0200, Thomas Schwinge wrote:
> > To finally bring this to an end, I propose the following.  Can you please
> > confirm that it works for you?
> Yes, it works for me.

OK, then please apply this change of mine to your local tree, like this,
for example (untested, so beware, and ask it there are questions):

    $ git checkout -b master-prefix_fix origin/master

That creates a new (local) branch master-prefix_fix, based on
origin/master, and switches to the new branch.

    $ git am < ~/where/you/saved/my/email

Apply my change to that branch.  It should be the only change on there
compared to origin/master, but better be sure, so...

    $ git log --reverse -p -C --cc origin/master..HEAD

... review the changes between origin/master and the current HEAD (HEAD
could be omitted in the command line, as it is the default), do this in
reverse ordering (i.e. the chronologically first change is shown first),
show the diff itself (I always quickly review patches again before
finally pushing them), be less verbose for copied / renamed files (not
relevant here), show merges more nicely (not relevant here).

    $ git push origin HEAD:master

Push to the origin repository the local HEAD branch into the remote
master branch.

    $ git checkout WHATEVER

Move away from the master-prefix_fix branch.  WHATEVER could be
origin/master, for example.  (But don't do commits directly in there!)

    $ git branch -d master-prefix_fix

Remove the working branch.

> And another question: how does one get such neatly formatted
> mail+patch things? Does one use git format-patch alone?

I'm also still mostly new to this, but here is what I do: first, I work
on branches, as indicated above already.  Then, I use ``git format-patch
[...]''.  If needed, I edit the resulting patch file(s) to include
further messages, explanations, etc.: add such texts after the first ---
line, so that it isn't considered part of the commit message.
(Everything between the first --- and the actual start of the changes
will be ignored by Git later on.)  Then, I send the patch file(s) using
``git send-email [...]'' (needs a local MTA).


Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]