Hacker News new | ask | show | jobs
by Finster 2997 days ago
"Every branch of every repo gets its own sandboxed directory. Your revision history in each branch, including uncommitted stuff, is persisted, as are build artifacts. When you switch contexts, each project is just as you left it."

Isn't that just svn? Why force a git-shaped peg into an svn-shaped hole?

4 comments

I'm glad that I wasn't the first (or second) person to notice this.

Admittedly, 99% of people are using git as a centralised source control system, and outside of branching/merging there hasn't been much of a change in workflow for many. I've not used their system, so I don't know how well this svn-like system works, but every time I think back to svn all I can think of is how painful this workflow was.

It's darcs as well, and many other systems. Why not try to improve something that can be a pain when using git?
Or git worktree
Oh, I had never heard of that command before. Does it work well, i.e. does it improve your workflow?
I generally have a worktree to develop in, and one for code reviews. So I can leave some indexed and some uncommitted changes in the first one, open a second IDE against the second one and use "find usages", "go to implementation" and other code navigation features missing from GitHub.

You can also create a worktree for a quick experiment (eg how many conflicts when I merge X and Y) and just rm it when you're done.

Sure, all these things can be achieved with git stash and git reset... but they are both difficult to keep track of and will cause your IDE to run its expensive reindexing.

It's kind of like how you could use pushd/popd and open subshells to work in one shell, but people prefer to just open another terminal window.

+1 for git worktree, it's great for making temporary copies of a repo when you need them
I agree, that's pretty much SVN shoehorned onto a git workflow. With git there is no need to save branches into folders. At most, push feature branches to a remote repository and check them out when needed.