Re: merging multiple commit into one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jean-luc malet wrote:
Hi,
I often commit "useless" code, for example before going into weekend
or for saving some state during a dev process
often thoses commit are simply useless and the commit message looks
like "COMPILE ERROR - temporary save .... "
at the end I have LOT of theses commits that are useless and I want to
save some space/time/tree complexity merge multiple sequential commits
(without branch) into one
is it possible?
according to my knowledge of git, removing the commit and rewriting
the last commit log so that it better reflect the modification will do
the job but I'm not sure git allow it...
thanks


git commit --amend; # to extend last commit only
git merge --squash; # I think. Not sure though, so read the docs
git rebase -i; # replace "pick" with "squash" to combine commits.

--
Andreas Ericsson                   andreas.ericsson@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Register now for Nordic Meet on Nagios, June 3-4 in Stockholm
http://nordicmeetonnagios.op5.org/

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]