[cmake-developers] Howto to "fuse" two commits in a single one with git

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Aug 5 14:26:46 EDT 2010


On Thu, Aug 5, 2010 at 2:19 PM, Eric Noulard <eric.noulard at gmail.com> wrote:

> Hi all,
>
> I want to "fuse" two (or more) consecutive git commit in a single commit
> in order to simplify my local history before pushing to remote.
>
> What I mean is that git log contains let say 5 commits.
> I want to "fuse together" commit 3 and 4 which would make
> my total history depth to 4 (instead of 5 previously)?
>
> Is it possible to do that directly on the git history (i.e. without
> creating a new branch) ?
> If yes How?
>

Interactive rebase is your friend,

http://book.git-scm.com/4_interactive_rebasing.html

Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20100805/4a5e6a52/attachment.html>


More information about the cmake-developers mailing list