Open fpnick opened 7 years ago
You're right, it would make a nice feature.
But I disagree the UI you describe. Create a new new branch is not correlated with a commit. It is correlated with checkout.
I think since a long time the best UI to checkout a branch, with completion of existing branches, and a prompt if the requested branch does not exists, asking the user if he wants to create a new branch.
What do you think of such UI?
That sounds good to me as well. The key point for me would be that I don't have to leave the Magit buffer in order to create the new branch.
What you describe regarding auto completion of existing branches would be a nice add-on, too.
Current state of thought. Thanks to comment on:
There may be several commands:
CBB
: prompt the user, asking for branch name. the prompt provides completion. when user types enter, if the branch does not exists, propose to create it (with git checkout -b
)CBF
: prompt the user, asking for branch name. create this branch at HEAD, even if branch already exists (git checkout -B
)CB-
: checkout previous branch (like git checkout -
)Agreed!
What just came to my mind: being able to initiate a merge (e.g. from a hotfix branch back to develop) from Magit would then also come in handy. This should probably be a 'follow-up' issue though.
Great. I would like a broader audience for the 3 new features (see also #142 and #24 ). If you want to participate, feel free to update the issues, and also discuss it on gitter.
For the merge feature, this is a nice thought. It will be a new feature, but not right now. Handle nicely merge conflict is not that easy.
Hi Jerome,
I just came across the following: I staged a couple of changes and thought: "Hey, I should open a new feature branch for this". However, that didn't seem to be possible in the Magit buffer, am I correct? So something like "Make this commit to a new branch (instead of the one I'm currently on) and change to that new branch."
That would be a nice feature, I think...