git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Knittl-Frank <knittl89@googlemail.com>
To: Hugh Davenport <hugh@davenport.net.nz>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Possible git bug
Date: Wed, 14 Aug 2013 07:42:11 +0200	[thread overview]
Message-ID: <CACx-yZ3Ba2vU4Jhjdtp1Ko=VjwarDkdHtN7ZFCzrU9Pz7-+S_Q@mail.gmail.com> (raw)
In-Reply-To: <9c9e5ea8a9d7e8ef37201cfb8ca9dcc3@davenport.net.nz>

On Wed, Aug 14, 2013 at 6:50 AM, Hugh Davenport <hugh@davenport.net.nz> wrote:
> Hey,
>
> Not sure if this is a bug or not. I commonly am finding myself wanting to
> remove some recent commits, either all or just a select few. So I use rebase
> in interactive mode for this. The problem I find is that when I do a rebase
> and leave no commits to pick (where I would think that this would do the
> same
> as a reset --hard) just tells me that there is nothing to be done.

This is left as a way to abort a rebase if you change your mind just
before actually executing it. This also works parallel to committing
with an empty commit message.

> So would that be a bug? Or maybe a feature? I would like it that when you do
> a rebase and select no commits, it will rebase ontop of the commit you
> chose,
> and remove all the commits not shown in the interactive listing (so all).

You can just use `git reset --hard <commit to rollback to>`  to
discard all commits after the given commit (Unless they're part of
another branch, of course). `git reset --soft` if you want to keep the
state of your current working directory.

Cheers,
Daniel

-- 
typed with http://neo-layout.org

  reply	other threads:[~2013-08-14  5:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  4:50 Possible git bug Hugh Davenport
2013-08-14  5:42 ` Daniel Knittl-Frank [this message]
2013-08-14  6:53   ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2021-09-16 21:21 [PATCH] Document `rebase.forkpoint` in rebase man page Junio C Hamano
2021-09-16 22:35 ` Possible git bug wesley
2021-09-16 22:46 ` wesley
2021-09-16  3:29 Wesley Schwengle
2021-09-16  5:37 ` Taylor Blau
2021-09-16 12:07   ` Wesley Schwengle
2021-09-16 12:47     ` wesley
2021-09-16 15:33       ` Junio C Hamano
2021-09-16 19:39         ` Wesley Schwengle
2021-09-16 21:52           ` Junio C Hamano
2021-09-16 22:30             ` Wesley Schwengle
2009-01-17 13:52 Damon LaCrosse
2009-01-17 15:16 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACx-yZ3Ba2vU4Jhjdtp1Ko=VjwarDkdHtN7ZFCzrU9Pz7-+S_Q@mail.gmail.com' \
    --to=knittl89@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=hugh@davenport.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).