Hacker News new | ask | show | jobs
by s_kilk 4121 days ago
It differs from python in that node is being used in this project, not python.

If the project used python it would be equally perverse.

As for why? Much of the functionality of this project is aliasing git commands to shorter names, which could be done easily as a git alias, or even a plain old shell alias or function.

Instead, node is invoked, which then uses the child_process module to... shell out to git. It's a pretty convoluted way of doing either `alias ggs='git status` or `git config --global alias.s status` .

Using node, or any other scripting language to transform `foo s` into `git status` seems a bit heavy to me, but then I'm not the target audience for this tool, so there is that.

Having said all that, gg does actually provide a bit more than simple aliases, it seems to do a decent job of prettifying the output from git commands and improving the user experience. I don't wish to discourage the author of this tool. I personally wouldn't use it, but they should feel proud of what they've made and continue hacking and making things.

1 comments

> Having said all that, gg does actually provide a bit more than simple aliases, it seems to do a decent job of prettifying the output from git commands and improving the user experience.

I wish you had included this in your initial comment, which otherwise seems like a knee-jerk reaction to a misinterpretation of the project's scope.

Personally, I would like to see it include significantly more robust functionality than aliases and prettified output in order to offset the cost of loading up the node runtime. There isn't much to be improved upon with the typical init/clone, pull, commit-all, push loop. Beyond those typical tasks, there's a lot of room for improvement, and that's where something like gg could excel. I would love to see something that helps with merge conflicts, rebasing, history modification, partial/interactive staging, etc.