Live data from Hacker News

Die Git Die

github.com

11–20 of 100 posts

Re: Die Git Die

#11
I'm not trying to argue that git is divinely inspired or whatever— this is confusing behavior.

It tells me I can lose history, but this is a revision control system, surely they don't mean I can actually lose history?

Sorry, but why did you think that they said that except to tell you that you could actually lose history? You ignored the rest of the error message and used --force. And then you were surprised that what the error message told you actually came to pass?

Re: Die Git Die

#12

I don't know why, but I always end up telling every single person who either 1) Bitches about git, or 2) asks for help, that I always, always, always tell "git push" or "git pull" which remote and branch. It's muscle memory and makes everything more explicit and easy to understand. Although, in this case, it sounds like you expect git to be intuitive. (Which it is not) So this basically amounts to a blog post complai…

From my experience, git pull origin branch didn't do what I expected. (Pulling from the remote branch to the current branch.) I haven't figured out what it does, so I just use git fetch then merge. :(

Re: Die Git Die

#13
Whenever I'm pulling down code, instead of `git pull', I use fetch. I fetch the specific branch into the local remote tracking branch (remote/branchname). Then use rebase, rather than merge. I won't lose anything and it avoids those dumb merge commits. Also, aliases are great for this.

    git fetch  :refs/remotes//
    git rebase  /

Re: Die Git Die

#14

I don't know why, but I always end up telling every single person who either 1) Bitches about git, or 2) asks for help, that I always, always, always tell "git push" or "git pull" which remote and branch. It's muscle memory and makes everything more explicit and easy to understand. Although, in this case, it sounds like you expect git to be intuitive. (Which it is not) So this basically amounts to a blog post complai…

It's a problem of user interface design. Git's user-machine interface does not follow the principle of least astonishment. It's not orthogonal. Functionality is grouped in very strange ways (you list, move, rename and delete branches with branch, but create branches using checkout? Seriously???).

And don't even get me started on the nightmare that is submodules.

The whole thing reminds me of the bad old unix days of "if it was hard to write, it should be hard to understand."

Re: Die Git Die

#15

I'm not trying to argue that git is divinely inspired or whatever— this is confusing behavior. It tells me I can lose history, but this is a revision control system, surely they don't mean I can actually lose history? Sorry, but why did you think that they said that except to tell you that you could actually lose history? You ignored the rest of the error message and used --force. And then you were surprised that wha…

While reading that line from the article I thought of a sign that says not to put a child safety seat in front of an airbag, along with the carefully rendered diagram of the airbag breaking the top of the safety seat off and striking the child in the head, and someone thinking "but these are safety restraint systems; surely they don't mean that they could actually harm the passenger?" and then going ahead with the incorrect safety seat placement without deactivating the airbag.

Re: Die Git Die

#16
post #7

"The git, the?" But seriously, yes, you have to learn how to use Git in order to use Git. But you don't have to use Git. Click here to renew your Visual Source Safe license, or better, just copy your file to file.1 every time you edit it. No way that can go wrong!

I understand Hacker News is a place for "serious" discussion, but a good Simpsons' reference always deserves props.

Re: Die Git Die

#17
post #9

you need to read "Git for dummies"

git has no user interface. git expects its users to have an in depth understanding of its implementation details. These are failures of git. Ideally, studying abstruse man pages to avert disaster wouldn't be required of new users.

i been using git for almost two years, never needed a gui

Re: Die Git Die

#18

I don't know why, but I always end up telling every single person who either 1) Bitches about git, or 2) asks for help, that I always, always, always tell "git push" or "git pull" which remote and branch. It's muscle memory and makes everything more explicit and easy to understand. Although, in this case, it sounds like you expect git to be intuitive. (Which it is not) So this basically amounts to a blog post complai…

It's a problem of user interface design. Git's user-machine interface does not follow the principle of least astonishment. It's not orthogonal. Functionality is grouped in very strange ways (you list, move, rename and delete branches with branch, but create branches using checkout? Seriously???). And don't even get me started on the nightmare that is submodules. The whole thing reminds me of the bad old unix days of…

[deleted]

Re: Die Git Die

#19

I totally agree that this is surprising behavior. But git did try to tell you: ! [rejected] master -> master (non-fast-forward) And once you've invoked the gods of `push -f`, you're on your own.

An evil prank would be to change someone's 'git push' alias to use -f by default.

Re: Die Git Die

#20
post #13

Whenever I'm pulling down code, instead of `git pull', I use fetch. I fetch the specific branch into the local remote tracking branch (remote/branchname). Then use rebase, rather than merge. I won't lose anything and it avoids those dumb merge commits. Also, aliases are great for this. git fetch :refs/remotes/ / git rebase /

That's equivalent to just doing `git pull --rebase`, no?
Post reply on HN