Closed bezbac closed 6 months ago
This isn't the same as what magit-branch-spinoff does. Spinoff doesn't just make-and-checkout a new branch for the current commit: it also rolls the current branch back to upstream. The idea is it lets you do a workflow where you make a commit or two first (on main
) before you create the new branch, and then it moves those commits to your new branch and takes them off of main
.
The functionality in this PR might also be useful and maybe is a better workflow than spinoff but I'd encourage you to give it a different name (or update this to match what spinoff does in magit).
@glasser Thanks for clarifying. I haven't used magit itself much, only this VSCode extension. Seems like I missed those details. I will have another look at implementing the automatic moving of the commits. 👍
This PR adds support for behavior similar to
magit-branch-spinoff
. I wanted the behavior myself, saw that other users requested it in https://github.com/kahole/edamagit/issues/124, received eight thumbs-up emojis, and it looked reasonably straightforward to implement.I'm open to feedback and other ideas on improving this.