r/programming • • Jun 19 '14

Reinventing GIT interface

http://tonsky.me/blog/reinventing-git-interface/
221 Upvotes

325 comments sorted by

View all comments

44

u/[deleted] Jun 19 '14

I guess I'm alone in finding git not that hard to use. My only issue is git isn't pretty and to that end I have a few scripts to give me prettier logs (like most people have) and prettier branch summaries (my macro displays all branches, their latest commit id and dates).

Beyond that I manipulate my tree with straight up git commands.

Any halfway competent developer should be able to master git in a couple of weeks let alone be able to write their own version of git given a couple of full time weeks to work in.

0

u/[deleted] Jun 19 '14

[deleted]

28

u/moor-GAYZ Jun 19 '14 edited Jun 19 '14

The set of things you can do with a repository is small enough

The set of things I need to do often, sure, is small enough.

But there's quite a long tail of things that I need to do rarely and have to look them up on the internet because they don't logically follow from anything I do day to day.

How do I delete remote commit tag? How do I make a branch tracking if I failed to do that initially? WTF is the difference between "tree-ish" and "commit-ish" and why does git archive use it to decide whether to use local or commit time when checking out?

That's not at all what the OP is concerned about by the way. They talk about reinventing several fundamental concepts of the interface, like embrace the fact that git repository is append-only (until gc runs) and make it truly append only, so that you always have access to the original commits that you rebased. Also automatically make WIP commits of the working copy before any git operations that can affect it -- I would actually go even further and say that these commits should be fully automatic and continuous, basically I want a persistent undo tree which I can tag as I work and then, after I'm done, arrange my changes into changesets that go to the public history.

7

u/[deleted] Jun 19 '14

I would actually go even further and say that these commits should be fully automatic and continuous

Holy shit! No dude! I don't want it to do that.

Git is a system level tool; not a note taking application.

8

u/moor-GAYZ Jun 19 '14

Holy shit! No dude! I don't want it to do that.

Git is a system level tool; not a note taking application.

You mean, it should be uncomfortable, hard to use, unforgiving, and require constant attention to minor details, to build character and turns smooth-cheeked youths, those who survived the hardships that is, into grizzly grey-bearded veterans?

10

u/[deleted] Jun 19 '14

It should not do things on its own or make assumptions about your workflow.

5

u/masklinn Jun 19 '14 edited Jun 19 '14

It obviously disagrees with you since git pull exists and the only way to coerce rebase -i in letting you rewrite the history without rebasing is arcane and inane (and may fail and end up trying to rebase your whole history on top of whoever the fuck knows what)

2

u/moor-GAYZ Jun 19 '14

Oh the git pull. It's not just that implied --rebase would fit most actual workflows much better, but even when merging it does it in the wrong order for about everyone except Linus himself.

git pull does the right thing when you are doing git pull someremote/somefeature (or should it be someremote:somefeature?). Then it merges that feature into your master.

When you do git pull origin/master, you totally don't want to have the master merged into your branch, you want your branch merged into master. The order of the parents in the merge commit is all wrong, and it shows up as the ugliest mess in gitk.

Not to mention that I generally would like to see what I am rebasing my changes on top of (especially so when using git pull in the supposedly intended way!), but it's not streamlined at all. It's like playing Russian Roulette, git pull #YOLO. Of course you can examine shit afterwards and fix anything that went wrong, but it's really not streamlined at all.

8

u/moor-GAYZ Jun 19 '14

Is Vim a pussy note taking app because it puts all your actions into the undo tree automatically?

The only thing that doesn't make assumptions about your workflow is a pile of sand. Everything else is valuable precisely because it introduces structure, and structure by definition means excluding some workflows.

-1

u/phySi0 Jun 20 '14

Git is a system level tool; not a note taking application.

Is Vim a pussy note taking app because…

1

u/moor-GAYZ Jun 20 '14

Are you implying that Vim is a pussy note taking app here? Because I bite my thumb at you if you do.

1

u/phySi0 Jun 20 '14

I'm implying that it's irrelevant. The guy you're arguing said "Git is a system level tool; not a note taking application" in response to "these commits should be fully automatic and continuous", implying that that's acceptable behaviour in a note taking app, but not a system level tool.

He specifically excluded note taking apps – which text editors are very similar to and you referred to Vim as a note taking app – from the category 'apps that should not make assumptions about your workflow'. Therefore, using Vim as a comparison ("Is Vim a pussy note taking app because it puts all your actions into the undo tree automatically?") is invalid, since it falls into the group 'note taking app', therefore, by his own admission also into the supergroup of 'apps that can acceptably make assumptions about workflow'.

→ More replies (0)