porcupine icon indicating copy to clipboard operation
porcupine copied to clipboard

right click -> git checkout branch

Open rdbende opened this issue 3 years ago • 8 comments

Would be good to have a git checkout option when right clicking on repo root.

rdbende avatar Oct 22 '21 15:10 rdbende

git checkout can do (at least) two very different things. Do you mean git checkout branch or git checkout file?

Akuli avatar Oct 22 '21 15:10 Akuli

Yeah, I meant git checkout branch

rdbende avatar Oct 22 '21 16:10 rdbende

If we add branch switching, we will also need to add something to show what branch you are on. Currently it is the only part of git status that is not shown anywhere in Porcupine. It would be even better to add something like git log --all --oneline --graph, which is a command I use all the time (with a shorter alias), and I don't ever do Git branches without it.

Akuli avatar Oct 22 '21 16:10 Akuli

Then it would be great to have a full Git frame with git lola and git branch stuff so that I don't have to press Super+1 all the time (that's my terminal). Although parsing git lola would be quite complicated.

rdbende avatar Oct 22 '21 16:10 rdbende

We will also have to think about whether we really want Porcupine to turn into a Git GUI, or do we want it to be just an editor. In my experience, if an editor includes a Git GUI, then:

  • Beginners use Git through the editor, and get confused when they need to do something on the command line (either because the editor's Git GUI doesn't have some functionality or doesn't show up in a google search about how to solve a specific problem with Git).
  • Experienced people (and beginners guided by experienced people) don't even bother with the editor's Git features, and they use Git through the terminal.

I'm sure there are exceptions, but that seems pretty rare. I can't think of any.

I think it's fine to add Git functionality to Porcupine, as long as it doesn't involve the concept of a commit. This way we can keep the useful coloring in the directory tree and even the git add buttons, but we won't end up making Porcupine into a full-featured Git client where beginners use 5% of the features and experienced people use none of them.

Akuli avatar Oct 22 '21 17:10 Akuli

Nor do I want Porcupine to become a Git GUI, but some git branch and git lola would be helpful, so you can see where you are, when editing. You'd still have to push, pull, commit and do other things in the terminal.

rdbende avatar Oct 22 '21 17:10 rdbende

If we add git lola support, it would be nice if you could right-click the commits to git show or git checkout them. For that we need git checkout support and also some kind of git show support. And why not also merging some branch by right-clicking it. But for merges we may end up with a conflict and Git asking for a commit message... and we just have implemented a full-featured Git client that nobody uses.

Which part of this chain of features is where we should stop, if we are going to add git lola?

Akuli avatar Oct 22 '21 21:10 Akuli

Actually, I would be happy with a simple label in the status bar that shows the current branch.

rdbende avatar Jul 17 '23 18:07 rdbende