git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: David <bouncingcats@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: *Non*-interactive squash a range ?
Date: Mon, 05 Jul 2010 08:27:23 +0200	[thread overview]
Message-ID: <4C317B4B.3070100@viscovery.net> (raw)
In-Reply-To: <AANLkTimTx2dVlK9KKi1nZpOadwDcfyzhE8nffCyK1Sqm@mail.gmail.com>

Am 7/3/2010 15:38, schrieb David:
> I tried this which seems to work:
>  $ git checkout uglybranch
>  $ git checkout -b cleanbranch
>  $ git reset --mixed E          # worktree same as uglybranch
>  $ git add .                    # adds any untracked files
>  $ git commit -a                # -a detects any removed files
> 
> So I'm thinking of using that method in a script. Have I overlooked
> anything? Is there a better way?

Use 'reset --soft' instead of 'reset --mixed' followed by 'add .'.

-- Hannes

  reply	other threads:[~2010-07-05  6:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03 13:38 *Non*-interactive squash a range ? David
2010-07-05  6:27 ` Johannes Sixt [this message]
2010-07-05  7:00 ` Daniele Segato

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=4C317B4B.3070100@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=bouncingcats@gmail.com \
    --cc=git@vger.kernel.org \
    /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).