5 ms·
The real reason ther eare few git GUIs is not that git expects advanced users that can use the command line. It is that it is very very hard to create a GUI for
by ufo 10y ago
The real reason ther eare few git GUIs is not that git expects advanced users that can use the command line. It is that it is very very hard to create a GUI for git due to the way it is built as a complex web of web of scripts written in C, Shell and Perl.
This architecture is the reason why projects such as libgit had to reimplement a lot of core git algorithms. https://libgit2.github.com/ https://libgit2.github.com/
Mercurial, on the other hand is more amenable for extension due to being built our of a bunch of Python modules.
- Sir_Cmpwn 10y agoYou're half right, but coming from the wrong place. The fact that git is hard to make a GUI for is an intentional design choice in git. It was built to be CLI first and shoehorning a GUI onto it is the wrong way to use git. The correct way is to learn how to be comfortable in a CLI. Git's design with that web of shell and perl and C is totally fine and suited to a CLI-first application.
- warbiscuit 10y agoI think different tasks are (more) suitable to different interfaces. CLIs are great when the space of actions you could perform is large (to nigh uncountable), but the range of subjects is small (the file paths, etc are known). Since you know the subjects, a programming language like `sh` is the most concise way to express a complex action. GUIs are better in the exact opposite case: when you have a constrained set of actions to perform, but a large number of subjects they may be performed on. In that case, the problem isn't expressing the action, it's picking which subjects to act on (pick these lines to commit, oh except let me edit that one, put that one aside, ok back to the commit i'm staging...). Many complex tools like VCSes contain both kinds of situations. I think sometimes a CLI is more appropriate, and sometimes a GUI is, depending on the context. IMO a fully mature VCS should make it as easy to invoke a gui for complex tasks as it is to do them from the command line.
- Sir_Cmpwn 10y ago>GUIs are better in the exact opposite case: when you have a constrained set of actions to perform, but a large number of subjects they may be performed on. In that case, the problem isn't expressing the action, it's picking which subjects to act on (pick these lines to commit, oh except let me edit that one, put that one aside, ok back to the commit i'm staging...). Those examples are not only possible, but easy to do in the CLI for an advanced user. I do that sort of thing every day. I agree that some tasks are better suited to a GUI and some are better suited to a CLI, but your VCS is firmly in the latter camp imo.
- warbiscuit 10y agoAs a semi-concrete example, say you have a VCS checkout with 40 edited chunks across 15 files. You want to commit 20 of 40 chunks (spread across 6 of 15 of the files). When you're halfway done, you notice a typo needs correcting in chunk 16, and fix it. You then proceed to commit your selection. From the command prompt, invoking thg and doing that took me about 18 seconds. I'm reasonably good on the command line, but I certainly don't see how to beat that time using just the cli. I think saying it's "easy for an advanced user" is a little loaded, but I'm still interested to know how to do that task faster. And if such a cli process could only be done with git, I'd consider switching.
- Sir_Cmpwn 10y agogit add -p
- warbiscuit 10y agoThat's a good example of where I think a gui has an advantage. For the example I gave, unless the hunks were asymetrically distributed, `git add -p` would require pressing "n" 20 times to skip through the excluded hunks (among other things), even when the user could visually see all the hunks, and know which ones they wanted. Where as gui would only require the clicks to select the "y" hunks. I realize this is arguing a difference in the efficiency, not capability, of the UIs; but that's basically my point. The use-cases where one or the other is optimal are too closely situated together in the problem space to say one is inherently the better choice, even for VCS tasks. While command line interaction may allow the user to receive a whole screen's worth of information at once, it forces them to interact with it in a serial fashion, regardless of whether out-of-order interaction with on-screen elements would allow them to complete the task faster.
- Amezarak 10y agoIt seems unintuitive to me that manipulating a graph via a GUI should be the wrong way to operate. I find it difficult to imagine this argument would be made if git were not the DVCS of choice. I would say, though, that the ideal GUI for a DVCS has probably not been invented yet.
- slrz 10y agoRight and it's pretty sad, I think. Most contemporary software doesn't even try making use of graphic displays and mouse input to create a more efficient interface for trained professionals, often lacking even the most basic forms of ad-hoc programmability.