From: "Boyd Stephen Smith Jr." <bss03@volumehost.net>
To: git@vger.kernel.org
Cc: "Li Frank" <Frank.Li@freescale.com>
Subject: Re: Can Git push only first parent history commits?
Date: Sun, 7 Dec 2008 22:03:20 -0600 [thread overview]
Message-ID: <200812072203.24996.bss03@volumehost.net> (raw)
In-Reply-To: <402F4B33D9C9DE4083DB96B416549FAF9E12@zch01exm23.fsl.freescale.net>
[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]
On Sunday 07 December 2008, "Li Frank" <Frank.Li@freescale.com> wrote
about 'Can Git push only first parent history commits?':
> The commit history is:
> origin/master
> Commit1..Commit2..Commit3(T1 branch).
>
> I want to combined Commit1, Commit2 and Commit3 to one commit_X
>and push to origin master and keep old T1 branch history. So I can't
>use rebase. T1 branch history will be lost after rebase.
I'm pretty sure you want to do something like this:
git branch T2 T1
git rebase -i master T2
# Editor opens
# Edit commit list to squash 3 commits into 1.
git push origin T2:master
git fetch origin
At the end, you'll have a history that looks like:
*--> origin/master (T2)
\
-> C1 --> C2 --> C3 (T1)
I'm not sure why you'd want to do this though. If the commits don't stand
alone well, they should be squashed on T1 before pushing. If the commits
do stand alone well, the history should preserve them on master as well.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss03@volumehost.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.org/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-12-08 4:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 2:52 Can Git push only first parent history commits? Li Frank
2008-12-08 3:00 ` Junio C Hamano
2008-12-08 3:11 ` Li Frank
2008-12-08 7:44 ` Matthieu Moy
2008-12-08 4:03 ` Boyd Stephen Smith Jr. [this message]
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=200812072203.24996.bss03@volumehost.net \
--to=bss03@volumehost.net \
--cc=Frank.Li@freescale.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.