jreybert / vimagit

Ease your git workflow within Vim
1.31k stars 49 forks source link

Feature Request: create and/or checkout branch #141

Open fpnick opened 7 years ago

fpnick commented 7 years ago

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

jreybert commented 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?

fpnick commented 7 years ago

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.

jreybert commented 7 years ago

Current state of thought. Thanks to comment on:

There may be several commands:

fpnick commented 7 years ago

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.

jreybert commented 7 years ago

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.