Can Git push only first parent history commits?
From: Li Frank <hidden>
Date: 2016-06-15 22:45:44
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