logoalt Hacker News

y1n0today at 12:56 AM2 repliesview on HN

I think I said named branches, but that is definitely what I mean. I find it strange that people want to work on anonymous branches, but to each their own. I don't so that has no appeal to me.

I often work on something and then switch away to something else. it might be a week before i get back to it, and the name of the branch is a clue as to what the heck I was doing.

Other people often need to check out a branch I'm working on to help. How does anonymous branching help anyone except a solo developer?


Replies

joluxtoday at 1:24 AM

> I think I said named branches, but that is definitely what I mean

I think I misread you, because you were talking about git vs svn in a way that made it sound like jj was a step backward from git as regards branching, and I got confused.

> I often work on something and then switch away to something else. it might be a week before i get back to it, and the name of the branch is a clue as to what the heck I was doing.

Right, but you can still name your branches with bookmarks, you’re just not required to. Personally, I tend to use commit descriptions more than bookmarks to keep track of what I’m working on, but this is a personal choice.

> Other people often need to check out a branch I'm working on to help. How does anonymous branching help anyone except a solo developer?

It’s just nicer as a local workflow, to me at least? I can create throwaway branches without having to come up with a name for them. I end up creating many, many more branches than I did in git as a result, which helps me keep my work better organized and my changes more focused when I submit them for others to review (which at least on GitHub, requires a bookmark of course). This is ultimately psychological because obviously I could just make up a name for the git branch, right? But it makes a big difference for me!

justinpombriotoday at 1:12 AM

> it might be a week before i get back to it, and the name of the branch is a clue as to what the heck I was doing.

Ah, this is what the description (what git would call the commit message) is for. You can set the description even before you've made any changes.

show 1 reply