Re: Feature Request: `git commit --amend-to`

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

 



On Fri, Sep 24, 2021 at 9:08 AM Aidan Gallagher <aidgal2@xxxxxxxxx> wrote:
> I have solved this issue for myself with this handy alias I found online
> ```
> git config --global alias.amend-to '!f() { SHA=`git rev-parse "$1"`;
> git commit --fixup "$SHA" && GIT_SEQUENCE_EDITOR=true git rebase
> --interactive --autosquash "$SHA^"; }; f'
> ```

since v2.31.0 you can do instead :

  git commit --fixup reword:$SHA && EDITOR=true git rebase
--interactive --autosquash "$SHA^"

granted it is not 1 command, but usually I find it useful to do
several of those and then one single
rebase at the end.

Carlo



[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