Thursday, April 7, 2011

Git >:@

While git is a very cool and powerful version control tool, it's command line UI is just awful. The fact that there are no fully-featured GUI alternatives(that don't suck) makes things even worse.

Let's talk about staging. I would say that a staging area is not useful in the majority of cases. Why is the default behaviour to force a staging process? Most of the time it's just an annoying "durr. stage everything please" step before you commit.

Then there's the actual commands. Want to add a file to be tracked?
git add <file>
Want to stage an already tracked file?
git add <file>

Why is it necessary to overload this command? At least these make some sense. How about unstaging?
git reset HEAD <file that's staged>

Really? reset? Why would you choose that instead of, you know, unstage!

Want to revert back to the previous commit? git revert would make sense... Too bad it's
git checkout -- .

Checking out previous commits makes sense, but the fact that you have to do it by copying and pasting an SHA-1 hash code sucks.

How about untracking and removing files. Well there's:
git rm <file>
which will remove the file from your working directory, and untrack it. There's also
git rm --cached <file>
which will just remove the file from git, but keep the actual file in your working directory. Why --cached is the flag they choose, I'll never know. What's wrong with --tracked?

I could go on and on. I like git because of how powerful it is, but I hate how many usability problems it has. It makes the learning curve much steeper. I've been using it for 4 months at work now, and it still throws me off every once in a while because of how unintuitive it is.

No comments:

Post a Comment