News for hackers. Stuff that matters.
Re:Working with git? These aliases will save you hours by mechanical_fish on Friday May 20, 2011 @08:27AM (#2567355)
if I saw this sort of stuff in my codebase...

Your codebase should be optimized for reading. Your aliases file should be optimized for very, very frequent typing.

These are different goals, so naturally the solutions look different.

Re:Working with git? These aliases will save you hours by 5teev on Friday May 20, 2011 @12:15PM (#2568266)
Typing on the command line is not like typing in a code file: it's perhaps the least forgiving environment for typos, and tiny mistakes can have huge consequences. A good typist can re-type the correct text after the command finishes--maybe a moment too late. A good coder takes pains to avoid the mistake in the first place.
Re:Working with git? These aliases will save you hours by mechanical_fish on Friday May 20, 2011 @05:24PM (#2569473)
tiny mistakes can have huge consequences

Yes, that's why we are not discussing the creation of easily typed aliases for "rm -rf". That would be bad.

Instead we are discussing aliases for a bunch of fairly innocent Git commands, most of which are reversible in case of catastrophic accident.

I admit that I do have a four-character abbreviation for "git reset --hard". Maybe that will burn me one day, though I rarely pile up so many uncommitted changes that I have much at risk. Or maybe I'll make that shortcut a little longer.

Re:Working with git? These aliases will save you hours by nevinera on Friday May 20, 2011 @07:11PM (#2569743)
It won't burn you, the commits are still around until you get garbage collected.
Re:Working with git? These aliases will save you hours by feralmoan on Friday May 20, 2011 @06:26PM (#2569652)
I don't understand why these examples even need to be optimised, just keep a pinkie finger hovered over tab and leverage bash's autocomplete :|