git rebase -i onto HEAD~n

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

 



Hi,

Is it possible to use git rebase -i for the following use case, in a
local branch?

$ git reset --soft HEAD~3
$ # magically squash HEAD~2 & HEAD, ignoring HEAD~1 (which should be
discarded)
$ git commit -m "new commit replacing current HEAD~2 HEAD, without the
commit HEAD~1 (to be discarded)"

I get the error below.

    grep: /home/user/project/.git/rebase-merge/done: No such file or
directory
    Cannot 'squash' without a previous commit

Or could you please suggest another command which is meant to this.

I must mention, that HEAD~3, in my case is the first commit, but I don't
think that makes any difference.

$ git --version
git version 1.6.0

Best regards,
Alok

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

--
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]

  Powered by Linux