Live data from Hacker News

On branching

b-list.org

11–20 of 43 posts

Re: On branching

#11
post #2

I've used svn and git, but something still doesn't feel right. I still like "cp -pr" and "diff -r" for version control. I waste disk space with whole directory copies, but I eventually "rm -rf" the really old ones. I don't trust automatic merges so I do them manually, yanking and pasting between vim edit panels. I am a paleolithic relic.

"rm -rf" is dangerous. A versioning system should allow you to get by without doing dangerous stuff.

Re: On branching

#12
post #11
post #2

I've used svn and git, but something still doesn't feel right. I still like "cp -pr" and "diff -r" for version control. I waste disk space with whole directory copies, but I eventually "rm -rf" the really old ones. I don't trust automatic merges so I do them manually, yanking and pasting between vim edit panels. I am a paleolithic relic.

"rm -rf" is dangerous. A versioning system should allow you to get by without doing dangerous stuff.

Oh yes, it's dangerous, and I rarely use it. It's funny, I just cd'ed into my ~/version/loom and saw a directory "58" sitting there dated 2008-08-17. I'll probably keep that one. Then there's "86.12.before_prune" dated 2009-05-20. I could "rm -rf" that one pretty safely, since my prompt shows my current directory as "~/version/loom". Here goes!

  laptop:~/version/loom$ rm -rf 86.12.before_prune
FEEL the adrenaline rush! ;)

Re: On branching

#13
post #11
post #2

I've used svn and git, but something still doesn't feel right. I still like "cp -pr" and "diff -r" for version control. I waste disk space with whole directory copies, but I eventually "rm -rf" the really old ones. I don't trust automatic merges so I do them manually, yanking and pasting between vim edit panels. I am a paleolithic relic.

"rm -rf" is dangerous. A versioning system should allow you to get by without doing dangerous stuff.

By the way there's another trick I sometimes use when I really really want to delete a directory but I also really really don't want to make a mistake:

  cd ~/somewhere
  mv the_thing_i_want_to_delete ~/tmp/go_away
  cd ~/tmp
  rm -rf go_away
I'll also use Tab to command-complete the "go_away", and pause slightly before pressing Enter.

Sometimes I'll even just let it sit there in ~/tmp for a few months before clobbering it.

Re: On branching

#14

Earlier quoted context omitted.

You seem to be under the impression that I'm afraid of short-lived branches for minor work. I'm not sure how you could have gotten that impression unless you didn't actually read the article.

I read the article, I enjoyed it. It reminded me of why I like git so much. git-diff doesn't require you to do gymnastics to compare files from different branches in the same working directory: "git diff branch1 [branch2] path" where omitting branch2 compares the working path instead of branch2's. And I think your second problem with git, that big hairy branches should somehow be distinct from small simple branches,…

git-diff doesn't require you to do gymnastics to compare files from different branches

It requires me to use git-diff. How do I do it without involving the VCS tool? How do I get both files side-by-side in Emacs so I can go through them thoroughly (some of us prefer that to reading diffs, you know)?

Since you can reconstruct deleted branches, I don't see the problem with deleting them.

I want the history of my codebase to be easy to get a feel for; that means major work (e.g., a long-lived branch which made significant changes) should be easily accessible. Telling people to hunt down the right merge commit and work back through its ancestry doesn't do that. Inventing ad-hoc schemes of tags or renamed branches to try to make up for the inability to keep a branch but say you're done with it doesn't do that.

It reminded me of why I like git so much.

Meanwhile, it's (one reason) why I don't like git so much.

Re: On branching

#15
It actually annoys me when people don't use git now. Git has clearly won among current dvcs. If something comes along later that's head and shoulders above dvcs, then I'll be happy to switch. But for now, random folks' views on why their tool is marginally technically better doesn't outweigh the enormous benefits of everyone you know using the same dvcs.

And it annoys me when people use BitBucket over Github. It's like your one friend who insists on not having a Facebook account and sticking to his Livejournal because Livejournal is supposedly better at some random thing, but in reality, you strongly suspect he just wants to prove he's not a follower, an independent breed cut from a better cloth than the rest of us.

These days, whenever I need a new little tool, its official repo is usually on Github. This lets me pull it into my project as a submodule and still contribute back in a very efficient way. As soon as it's mercurial, I can't, simply because I don't know mercurial and I certainly have zero intention of attaining the same mastery of it that I have of git. And, frankly, I don't want to attain any mastery of it.

Moreover, of course, you can't just mix repos willy nilly. Maybe there's a way to use mercurial as a submodule of git repos. But it's gonna be a dastardly hack.

So, please. Just use git. Competition is good, but so is standardization. I get that you have highly nuanced opinions about the various merits of dvcs, and I'm sure you're right and I'm wrong. But it just doesn't matter, because the benefits of mercurial don't outweigh the beneficial network effects of using git, and that's never going to change.

Re: On branching

#16

Earlier quoted context omitted.

I read the article, I enjoyed it. It reminded me of why I like git so much. git-diff doesn't require you to do gymnastics to compare files from different branches in the same working directory: "git diff branch1 [branch2] path" where omitting branch2 compares the working path instead of branch2's. And I think your second problem with git, that big hairy branches should somehow be distinct from small simple branches,…

git-diff doesn't require you to do gymnastics to compare files from different branches It requires me to use git-diff. How do I do it without involving the VCS tool? How do I get both files side-by-side in Emacs so I can go through them thoroughly (some of us prefer that to reading diffs, you know)? Since you can reconstruct deleted branches, I don't see the problem with deleting them. I want the history of my codeba…

How do I get both files side-by-side in Emacs so I can go through them thoroughly (some of us prefer that to reading diffs, you know)?

  git show branch:path/to/file > /tmp/file
I want the history of my codebase to be easy to get a feel for

So never delete branches. You'll know if they're "done" if they've been merged into your master branch.

Re: On branching

#17
post #15

It actually annoys me when people don't use git now. Git has clearly won among current dvcs. If something comes along later that's head and shoulders above dvcs, then I'll be happy to switch. But for now, random folks' views on why their tool is marginally technically better doesn't outweigh the enormous benefits of everyone you know using the same dvcs. And it annoys me when people use BitBucket over Github. It's li…

I had a two-word reply to your opinions, but then I realized HN would vote me down into oblivion for expressing it in those terms.

So I'll pose it in different terms: why haven't you given into the network effects of, say, Visual Basic?

Re: On branching

#18
post #15

It actually annoys me when people don't use git now. Git has clearly won among current dvcs. If something comes along later that's head and shoulders above dvcs, then I'll be happy to switch. But for now, random folks' views on why their tool is marginally technically better doesn't outweigh the enormous benefits of everyone you know using the same dvcs. And it annoys me when people use BitBucket over Github. It's li…

Maybe it's the circles I travel in, but I don't see the same git dominance you do vs. mercurial; I see them both really frequently. Among major projects I can think of off the top of my head, Python, Adium, OpenOffice, and Mozilla are all on mercurial.

Re: On branching

#19

I don't really see much value in keeping a branch around after development is complete (or defunct). If the work is complete then merge it (with no-ff if you want to show the merge explicitly). If it's defunct then delete it. If you want to keep it around but discourage further development then tag it or come up with a naming convention. That you have the ability to mark branches as closed in mercurial is mainly pape…

I don't really see much value in keeping a branch around after development is complete (or defunct). If you have both branches and a way to close them, then you have a much simpler way to get a feel for the history of the code. You know at a quick glance what sort of major work has gone on and what's still ongoing. If you don't have that you'll end up inventing more complex ad-hoc schemes to get it (merging a branch,…

Actually, git supports more workflows, you could simply implement read-only branches with a naming scheme and a hook.

In lots of ways git is a superset, branch workflow included.

Re: On branching

#20

Earlier quoted context omitted.

I read the article, I enjoyed it. It reminded me of why I like git so much. git-diff doesn't require you to do gymnastics to compare files from different branches in the same working directory: "git diff branch1 [branch2] path" where omitting branch2 compares the working path instead of branch2's. And I think your second problem with git, that big hairy branches should somehow be distinct from small simple branches,…

git-diff doesn't require you to do gymnastics to compare files from different branches It requires me to use git-diff. How do I do it without involving the VCS tool? How do I get both files side-by-side in Emacs so I can go through them thoroughly (some of us prefer that to reading diffs, you know)? Since you can reconstruct deleted branches, I don't see the problem with deleting them. I want the history of my codeba…

GIT_EXTERNAL_DIFF lets you use emacs as your diff tool.

http://stackoverflow.com/questions/255202/how-do-i-view-git-...

Post reply on HN