Re: *Non*-interactive squash a range ?
Am 7/3/2010 15:38, schrieb David:
Show 9 quoted lines
> 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