From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Subject: Re: using git
Date: Wed, 11 Jan 2012 14:04:05 +0100 [thread overview]
Message-ID: <4F0D88C5.4060704@pengutronix.de> (raw)
In-Reply-To: <20120111125433.GH314@e-circ.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
On 01/11/2012 01:54 PM, Kurt Van Dijck wrote:
> On Wed, Jan 11, 2012 at 01:39:02PM +0100, Marc Kleine-Budde wrote:
>> On 01/11/2012 01:26 PM, Kurt Van Dijck wrote:
>>>>> nitpick:
>>>>> Oliver, please don't forget to add your S-o-b if you are pushing commits
>>>>> to the tree.
>>>>
>>>>
>>>> Yes. I noticed myself, that i need to improve this process by reading more git
>>>> documentation ;-)
>>>>
>>>> Yesterday i just cherry-picked the patch and pushed it to the repo.
>>>>
>>>> The next time i'll do it the right(TM) way :-)
>>>
>>> Oliver or Marc,
>>>
>>> just out of curiosity,
>>> what would be the right(TM) way?
>>
>> 3 possibilities:
>>
>> 1) merge your tree:
>> (if it only contains the patch we want)
>>
>> git checkout master
>> git merge tree-of-kvd/branch-name
>> git push origin master
>>
>> 2) cherry pick
>>
>> git checkout master
>> git cherry-pick -s commitish-of-patch # -s automatically adds the S-o-b
>> git push origin master
>>
>> 3) apply patch
>>
>> git checkout master
>> git am -s /path/to/patch # -s automatically adds the S-o-b
>> git push origin master
>>
>
> thanks for this lesson :-)
> 1 additional question:
> Would in case 3 the SHA commit name be the same?
Compared 2 and 3?
Usually not. As the meta data (here the timestamps) will be included in
the calculation of the committish, it won't be the same. E.g. the meta
data of your commit in master:
Author: Kurt Van Dijck <kurt.van.dijck@eia.be>
AuthorDate: Wed Dec 21 10:08:57 2011 +0100
Commit: Oliver Hartkopp <socketcan@hartkopp.net>
CommitDate: Tue Jan 10 17:41:07 2012 +0100
But you can tweak the timestamps, e.g. during "git commit --amend" with
the environment variables GIT_AUTHOR_DATE, GIT_COMMITTER_DATE ("man
git-commit").
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-01-11 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 9:19 [can-utils] canbusload: flush output at the end of each cycle Kurt Van Dijck
2011-12-22 6:40 ` Oliver Hartkopp
2012-01-11 11:12 ` Marc Kleine-Budde
2012-01-11 11:17 ` Oliver Hartkopp
2012-01-11 12:26 ` using git Kurt Van Dijck
2012-01-11 12:39 ` Marc Kleine-Budde
2012-01-11 12:54 ` Kurt Van Dijck
2012-01-11 13:04 ` Marc Kleine-Budde [this message]
2012-01-11 11:18 ` git question Kurt Van Dijck
2012-01-11 11:28 ` Marc Kleine-Budde
2012-01-11 12:22 ` Kurt Van Dijck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F0D88C5.4060704@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).