Switch to a branch and automatically merge the current branch and any uncommitted changes into it

git switch

  • Switch between Git branches. Requires Git version 2.23+.
    See also `git checkout`.
    More information: <https://git-scm.com/docs/git-switch>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git switch --merge {{branch_name}}

click the source code to copy install git switch on any operating system with command-not-found.com