From: Johannes Sixt Date: Mon, 05 Jul 2010 06:27:23 GMT Subject: Re: *Non*-interactive squash a range ? Message-ID: <4C317B4B.3070100@viscovery.net> In-Reply-To: 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