Live data from Hacker News

Legit. Git for humans

git-legit.org

111–120 of 136 posts

Re: Legit. Git for humans

#111
post #85
post #65

Earlier quoted context omitted.

I'd be curious to see a few examples. Git is guilty of using a bunch of non-standard nomenclature, and of using existing terms in non-standard ways ("checkout", I'm looking at you). But I certainly wouldn't call the interface or syntax "inconsistent" or "random". It's actually very tersely designed and very well put together. The "actual concepts" are, for the most part, first class citizens in the interface.

I agree with basically everything Elijah has to say here for example: http://people.gnome.org/~newren/eg/git-eg-differences.html

OK, I'm seeing where you're coming from. But I guess I don't see the severity. Yes, git's terminology is highly non-orthogonal (the umpteen different synonyms for the "index" was pretty amusing). But... that's just the frosting. Who cares how messy it is if the cake is still good?

Yes, it's messy. But I don't really see that it hurts comprehension. And it hurts learning only inasmuch as you can't guess at a command and have to check the man page (i.e. I know there's a diff variant that checks the index vs. HEAD, what's it called?). I can't honestly say I found it difficult to understand what the index was due to this.

Re: Legit. Git for humans

#112
post #78
post #65

Earlier quoted context omitted.

I'd be curious to see a few examples. Git is guilty of using a bunch of non-standard nomenclature, and of using existing terms in non-standard ways ("checkout", I'm looking at you). But I certainly wouldn't call the interface or syntax "inconsistent" or "random". It's actually very tersely designed and very well put together. The "actual concepts" are, for the most part, first class citizens in the interface.

> But I certainly wouldn't call the interface or syntax "inconsistent" or "random". Uhm, NO WAY. git checkout works on both branches and files. I can `checkout remote-name/branch` but I have to `push remote-name branch`. Deleting a local branch is `branch -D` but deleting a remote branch is (I still can't fucking believe it) `push remote :branch`. It's surprisingly hard to unstage a file. If a rebase fails, it gives…

> for someone who doesn't understand git internals

Looks like that's the difference. As someone who does understand Git internals, everything seems perfectly logical and consistent to me. Perhaps it's the same with the person you are replying to.

And really, using Git without understanding the internals is a suicide, quite a few people broke their repos and asked me to recover them. The internals are very easy to learn.

Re: Legit. Git for humans

#113
post #78

Earlier quoted context omitted.

> But I certainly wouldn't call the interface or syntax "inconsistent" or "random". Uhm, NO WAY. git checkout works on both branches and files. I can `checkout remote-name/branch` but I have to `push remote-name branch`. Deleting a local branch is `branch -D` but deleting a remote branch is (I still can't fucking believe it) `push remote :branch`. It's surprisingly hard to unstage a file. If a rebase fails, it gives…

It's surprisingly hard to unstage a file. Is there a case when it's not a simple git reset my-file away?

Indeed no. That's exactly what git reset does: "copy entries from to the index". I got that from the unusably bad man page. It was the first sentence.

Re: Legit. Git for humans

#115
I really like this idea. I consult Stack Overflow or the git man pages frequently enough to make it annoying, but infrequently enough to have the appropriate magic incantations become instinct.

However, if I am going to distance myself from the bare metal of git, why not go all the way and use something like GitHub for Mac? That seems like a true "Git for humans". I love working from the command line as much as possible though, so I will watch this closely to see if it becomes widely adopted.

Re: Legit. Git for humans

#116

It seems that git is the new regex. People are actively building things around instead of learning the rules. I suppose that came from writing being easier than reading.

I know regular expressions way better than most people I come across and I still never feel to good about my command of the more 'esoteric' features. Having a version control system ( something that more people will use more often every day than regexes ) compared to them, is not a heartening thought.

Underneath, git is actually based on a really simple tree-of-objects data structure. All those esoteric features are built on an elegant base; understand that base, and you can understand anything git does (though it may not be obvious at first).

Re: Legit. Git for humans

#117
post #113

Earlier quoted context omitted.

It's surprisingly hard to unstage a file. Is there a case when it's not a simple git reset my-file away?

Indeed no. That's exactly what git reset does: "copy entries from to the index". I got that from the unusably bad man page. It was the first sentence.

My question was a rhetorical one :)

Re: Legit. Git for humans

#118
post #113

Earlier quoted context omitted.

It's surprisingly hard to unstage a file. Is there a case when it's not a simple git reset my-file away?

Indeed no. That's exactly what git reset does: "copy entries from to the index". I got that from the unusably bad man page. It was the first sentence.

And in every git status message.

Re: Legit. Git for humans

#119
post #78

Earlier quoted context omitted.

> But I certainly wouldn't call the interface or syntax "inconsistent" or "random". Uhm, NO WAY. git checkout works on both branches and files. I can `checkout remote-name/branch` but I have to `push remote-name branch`. Deleting a local branch is `branch -D` but deleting a remote branch is (I still can't fucking believe it) `push remote :branch`. It's surprisingly hard to unstage a file. If a rebase fails, it gives…

It's surprisingly hard to unstage a file. Is there a case when it's not a simple git reset my-file away?

Yes there is. When you have a new repository without any commits, there is no HEAD, so you can't unstage by resetting.

    mkdir try
    cd try
    git init
    touch file
    git add file
    git status
Still, the git status command shows you what you need to do to unstage.

Re: Legit. Git for humans

#120
post #81
post #78

Earlier quoted context omitted.

> But I certainly wouldn't call the interface or syntax "inconsistent" or "random". Uhm, NO WAY. git checkout works on both branches and files. I can `checkout remote-name/branch` but I have to `push remote-name branch`. Deleting a local branch is `branch -D` but deleting a remote branch is (I still can't fucking believe it) `push remote :branch`. It's surprisingly hard to unstage a file. If a rebase fails, it gives…

Yeah, deleting a remote branch by "git push remote :branch" is pretty terrible, one colon between heaven and hell.

If you understand how git push works, it sort of makes sense. But fortunately the devs added a --delete option to git push which is much more clear.
Post reply on HN