Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for magit-branch-spinoff #290

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Conversation

bezbac
Copy link
Contributor

@bezbac bezbac commented Mar 7, 2024

This PR adds support for behavior similar to magit-branch-spinoff.
I wanted the behavior myself, saw that other users requested it in #124, received eight thumbs-up emojis, and it looked reasonably straightforward to implement.

I'm open to feedback and other ideas on improving this.

@kahole kahole merged commit cce3727 into kahole:develop Mar 25, 2024
1 check passed
@glasser
Copy link

glasser commented Mar 25, 2024

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).

@bezbac
Copy link
Contributor Author

bezbac commented Mar 26, 2024

@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. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants