Re: using git
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2012-01-11 13:04:11
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:quoted
On 01/11/2012 01:26 PM, Kurt Van Dijck wrote:quoted
quoted
quoted
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 masterthanks 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 [off-list ref]
AuthorDate: Wed Dec 21 10:08:57 2011 +0100
Commit: Oliver Hartkopp [off-list ref]
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 |
Attachments
- signature.asc [application/pgp-signature] 262 bytes