Hacker News new | ask | show | jobs
by bcl 4121 days ago
I don't see anything here that you can't do with git alias, what am I missing?
2 comments

well, if you've always wanted to lose the ability to work with branches you're in luck
You can easily bash add autocompletion to bash aliases, if you meant that.

For instance, this is my git dotfile doing that to display branches for a cherry-pick alias:

https://github.com/jakub-g/dotfiles/blob/master/git.profile#...

(_gitbranches() is defined at the beginning)

Branches are a planned feature, check the TODO.

If you would like to contribute to the addition of branches, that would be great. :)

There's more to the package than just aliases.

For example, the gg s command presents you with an easy to look at a quick glance status of your repository. In addition, there are aesthetic changes that increase the intuitiveness of Git itself.

Here's a screenshot of the gg s command in action: http://i.imgur.com/qXSPuv4.jpg.

Sure it's not exactly an alias, but this is basically just splitting the usual `git status` output and coloring it. I have similar functions in my .bash_profile for git and it doesn't require node. Consider this: I can easily scp my dotfiles to a server and use all my shortcuts. To use this I have to install Node, npm, and this package to gain a couple of new shortcuts that make existing functions a little prettier.
Your .bash_profile functions probably aren't exposed to others via a package manager. They're probably not available in a repo for others to contribute to either.

Yes, node/npm are required, but most of the servers I work with these days already have those for other tools.

Mine are, but that’s because I’ve published my .dotfiles for everyone to use. What I haven’t done is made them usable by anyone who isn’t using my dotfiles. That wouldn’t be that hard to do, I just need time to develop infrastructure around it (which is probably worth doing anyway because my dotfiles are feeling a bit creaky).

EDIT: Scratch that. I just saw that git-config supports include directives. The infrastructure is already done for me. Now I just need to separate that bit of code out of the main dotfile repository.

Pairing git-config's include directives with a separate semver-tagged repo for your Git code sounds reasonable.

I guess what I was getting at here is that I haven't come across a good analog to npm for shell scripts or dotfiles "modules". Using node/ruby/py/etc instead of shell scripts is often overkill (debatable for gitgoodies), but having the standardized infrastructure is valuable.