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

Can Git push only first parent history commits?

From
LFLi Frank <frank.li@freescale.com>
Date
Dec 8, 2008, 02:52 UTC
Message-ID
<402F4B33D9C9DE4083DB96B416549FAF9E12@zch01exm23.fsl.freescale.net>
        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. 
        So I create T2 branch at origin/master:
	
        origin/master
              Commit1..Commit2..Commit3(T1 branch). 
	  T2 (branch).
        Then I use "git merge --no-ff --log T1" merge T1 to T2.  
        So 
	  origin/master
              	+--Commit1..Commit2..Commit3(T1 branch). +
	
+----------------------------------------------------------------+--Comm
itX(T2 branch).
       But when I push T2 to origin master, Commit1 ,2, 3 also pushed.
I expect there are only CommitX at origin master branch. 
       How can I do?
 
best regards
Frank Li
Next: Junio C Hamano
Message 1 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.