threads / discuss / 11117

Pack several linear commits into one

Subject: Pack several linear commits into one

## tl;dr

3 messages between Dec 3, 2007 and Dec 3, 2007.

replies: 2people: 3as markdown or json

Jacob Kroon· Dec 3, 2007, 09:06 UTC · lore
Hi,
Is there a tool for repacking several linear commits into one single ?
Please CC me since I'm not a subscriber to the list.

Best Regards Jacob Kroon

Peter Baumann· Dec 3, 2007, 09:28 UTC · re: Jacob Kroon · lore

Re: Pack several linear commits into one

On Mon, Dec 03, 2007 at 10:06:11AM +0100, Jacob Kroon wrote:
Show 6 quoted lines
> Hi,
> 
> Is there a tool for repacking several linear commits into one single ?
> 
> Please CC me since I'm not a subscriber to the list.
> 
Look for git merge --squash  or  git cherry-pick --no-commit
-Peter
Jakub Narebski· Dec 3, 2007, 09:32 UTC · re: Jacob Kroon · lore

Re: Pack several linear commits into one

"Jacob Kroon" <jacob.kroon@gmail.com> writes:
> Is there a tool for repacking several linear commits into one single ?

You can use either "git rebase --interactive" and replace 'pick' with 'squash', or (simpler for replacing all the commits by one big commit) "git merge --squash". See documentation for details.

Note that if you want remove those 'several linear commits', you better not have them published yet.

> Please CC me since I'm not a subscriber to the list.

You can read this list via archives, or using NNTP interface (in news reader):

  nntp://news.gmane.org/gmane.comp.version-control.git
-- 
Jakub Narebski
ShadeHawk on #git
Poland

← back to recent threads