Live data from Hacker News

Die Git Die

github.com

41–50 of 100 posts

Re: Die Git Die

#41
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!

"The git, the?"

And feminine, at that?

Re: Die Git Die

#42
I'm grateful for the Tower GUI app. Just wish it would tell me what commands it was using, since I'd like to know.

Re: Die Git Die

#43
Well. Actually you are using git in place where svn or rsync should be enough.

Just look at git.kernel.org - over 400 repos only for linux kernel. This is what git designed for - to be Mass Distributed Version Control System.

So are using it as tape archiver and wondering why defaults look so unfrendly.

Re: Die Git Die

#44

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…

It still is a broken design that you can ever lose history or hose a repository in a tool that is designed to store history, forever.

That's a sharp edge that should be exposed, and its not the only one in git.

Re: Die Git Die

#45

Earlier quoted context omitted.

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…

you list, move, rename and delete branches with branch, but create branches using checkout? Seriously??? git checkout -b new-branch ... is a shortcut for: git branch new-branch git checkout new-branch You can create the branch or otherwise manipulate it without actually checking it out, so it's useful to have it separate and have a shortcut. (I agree that git's interface is terrible, but I disagree that this is one o…

> but I disagree that this is one of those cases

I do think this is precisely one of those cases.

"Branch" is a major, repo-modifying operation; "checkout" is a trivial context switch operation. The user interface disaster here was that the major operation is treated as subservient to the trivial operation. It should be the other way around.

Therefore, the shortcut for creating a branch and switching to it should be

  git branch -c new-branch
whereby the -c switch checks you into that branch immediately.

Re: Die Git Die

#46

Earlier quoted context omitted.

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…

you list, move, rename and delete branches with branch, but create branches using checkout? Seriously??? git checkout -b new-branch ... is a shortcut for: git branch new-branch git checkout new-branch You can create the branch or otherwise manipulate it without actually checking it out, so it's useful to have it separate and have a shortcut. (I agree that git's interface is terrible, but I disagree that this is one o…

Except, why isn't it "git branch --nocheckout" for the rare cases when you don't want to check out?

Re: Die Git Die

#48

Git has a lot of UI problems. This is not really surprising. It's gotten a lot better, but I do think that no matter how proud Torvalds is of the fact that he never looked at another version control system for inspiration, a lot of pain could have been avoided if he had (even while still going in the different directions he did). Not all of us had the 'luxury' of never working with version control before. But don't g…

  >no matter how proud Torvalds is of the fact that he
  >never looked at another version control system for
  >inspiration
What gave you that impression? Git was strongly influenced by BitKeeper and to a much lesser extent by Monotone. And, arguably, 'anti-inspired' by several other VCS's Linus would have surely been at least passingly familiar with.

Re: Die Git Die

#49
post #6

> $ git push origin gh-pages I think that if you had changed the above to $ git push -u origin gh-pages then everything else would have gone smoothly.

This is what I do personally. We also use rebases liberally at my office which requires us to force push upstream. On-boarding new team members scares the shit out of me.

I hear ya, but as you obv know as long as you're pushing to a location only you are pushing to, a force-push is harmless.

Moreover, any loss that does occur is recoverable as long as you keep your clone around. Git doesn't garbage collect refs for at least 30 days. So you're pretty protected if you clone to a location that has regular backups.

Re: Die Git Die

#50
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 /

I never knew of the local remote tracking branches in git until now. I just went and looked it up and found this post that explains it more http://longair.net/blog/2009/04/16/git-fetch-and-merge/

  git branch -r
will show all the remote tracking branches I had no idea existed. Thanks a lot, git makes much more sense to me now.
Post reply on HN