git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Can Git push only first parent history commits?

From
LFLi Frank <frank.li@freescale.com>
Date
Dec 8, 2008, 03:11 UTC
Message-ID
<402F4B33D9C9DE4083DB96B416549FAF9E2D@zch01exm23.fsl.freescale.net>
In-Reply-To
<7v7i6bbcc6.fsf@gitster.siamese.dyndns.org>
I don't know the detail of git internal.  Or my email subject
description have some problem. 
 
I just want to combine some commits to one commit and push combined
commit to remote.  And at same time, keep commits history at my local
repository.  Rebase will make original history lost. 
 
-----Original Message-----
From: Junio C Hamano [mailto:gitster@pobox.com] 
Sent: Monday, December 08, 2008 11:00 AM
To: Li Frank-B20596
Cc: git@vger.kernel.org
Subject: Re: Can Git push only first parent history commits?

Your drawing nor explanation unfortunately does not make much sense to me, so I'll respond only to the subject.

Pushing only first parent history would mean that the commits you will be transferring will still record their true parents, but you are not sending any parents but the first ones. The repository that receives such a push would not pass fsck, in other words, you are deliberately corrupting the repository.

Naturally we won't support such an operation by default.

It is plausible that you can implement an option to do so, but it would make it hard at the receiving end to tell between a true repository corruption and a corruption you are deliberately introducing by such a push, so it won't be useful unless accompanied by a corresponding option to fsck to make it not complain when parent commits and associated objects that are not necessary for first parent history.

Previous: Junio C HamanoNext: Matthieu Moy
Message 3 of 5 in “Can Git push only first parent history commits?”
  1. Li FrankDec 8, 2008
  2. Junio C HamanoDec 8, 2008
  3. Li FrankDec 8, 2008
  4. Matthieu MoyDec 8, 2008
  5. Boyd Stephen Smith Jr.Dec 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.