News for hackers. Stuff that matters.
Re:Working with git? These aliases will save you hours by silversmith on Friday May 20, 2011 @07:20AM (#2567206)
While I agree that aliasing checkout just does not make sense given how often it is used, and (at least in my opinion) aliasing push to be easier to accidentally invoke is a bad decision, given that it modifies upstream, making the more used commands shorter is a nice to have feature.

I myself only use couple aliases, for the most used commands - 'gita' for add, 'gits' for status, 'gitd' for diff. Those are the things I use A LOT (especially when preparing a commit), and shaving off couple characters there does pay off. And no, I don't feel that these muscle-memory level shortcuts add any mental load.

Re:Working with git? These aliases will save you hours by hammerdr on Friday May 20, 2011 @07:45AM (#2567256)
I only alias git commands that have typical flags that I use over and over. For example, "git log --pretty=oneline -10" is aliased to gitlog.

Basically, any command that I have to even passively think about the parameters which is used often enough gets its own alias. This does not include commands like "git add" because I don't even think about parameters when I'm typing it out. Having to remember that I set ga to "git add" adds more work than I'm doing now.

Re:Working with git? These aliases will save you hours by 198d on Friday May 20, 2011 @11:51AM (#2568155)
Thank you! Easily the only sane comment about aliasing.

I am willing to believe that aliases like 'ga' and 'gp' would actually increase productivity if all you did all day long was manipulate a git repository or you had some physical disability in which it was actually difficult to type on a keyboard, but I mean, using my source control tool is such a small piece of the larger initiative I take on day in and day out, that in the end, the extra keystrokes aren't going to have any meaningful impact on the amount of value I add to the projects I work on.

There's also the issue with portability. You have to be able to bring those aliases with you anywhere you go. A great example I heard about was at a meetup once where a guy tried to give a talk on git and because he wasn't using his machine, that talk was almost worthless because he kept typing his precious little aliases and, arguably, didn't really know how to use the tool he was trying to demonstrate.

Re:Working with git? These aliases will save you hours by sanderjd on Friday May 20, 2011 @03:31PM (#2569102)
"The extra keystrokes aren't going to have any meaningful impact on the amount of value I add to the projects I work on."

Nor will removing those keystrokes have a negative impact on the value you add.

Fear of forgetting the original commands is a reasonable argument against using aliases. It's very similar to the argument against using vim plugins for fear that you won't know how to use vi on servers or other peoples' machines. Nonetheless, most people use the plugins on their development machines which they feel make them the most productive in their day to day work. Same thing for aliases.

Re:Working with git? These aliases will save you hours by m1rk00 on Saturday May 21, 2011 @09:10AM (#2570806)
"It's very similar to the argument against using vim plugins for fear that you won't know how to use vi on servers or other peoples' machines."

Using vim plugins on your development machine should only add value to your standard commands. You still use standard vim commands to move around and manipulate text. And noone expects you to modify whole application on server, so you don't need those extra plugins for project manipulation, code completion (you still can type, right?) or highlighting

Re:Working with git? These aliases will save you hours by txxxxd on Friday May 20, 2011 @12:51PM (#2568431)
I probably use 'git checkout' 50-100 times a day, which I imagine is typical when you're working on several branches at once.