automatically stash save/pop changes on git rebase?

前端 未结 5 1928
再見小時候
再見小時候 2021-01-30 20:40

my git workflow uses rebase a lot. I always fetch upstream changes (the main repo i forked from) and then merge to my branches, and then rebase to remove useless (to me :D) merg

5条回答
  •  忘掉有多难
    2021-01-30 21:25

    One Simple Answer: git rebase -i --autosquash --autostash

    -i = interactively rebase

    https://devdocs.io/git/git-rebase


    This will...

    • Auto stash your changes
    • Interactively rebase from
      • Auto position your squashes and fixups
    • Auto pop stash in working directory after rebase

    tree-ish can be a commit hash or a branch name or a tag or any identifier.

提交回复
热议问题