Jump to content

add better configuration for fields and templates and make them version controllable


dotnetic

Recommended Posts

I'm not using them day-to-day... that would be such an overhead. But yes, worktrees are some kind of next-level chaos at first. Still sometimes really nice. 

I used worktrees in some larger projects in which lots of things happened at the same time. So switching from branch to branch, stashing, half-baked commits didn't work out at all. I mapped each worktree to its own virtual host, could switch code bases whenever needed without said things, like stash or commit.

Are they perfect? No. At least not in my day-to-day projects.
But there have been some projects I really benefitted from worktrees.
Still a tiny fraction, but still.

I assume it will work out totally different in case you do C/C++, Rust, Go, TS... things like that.
At least that's my impression while watching coding session similar to video linked above.

  • Like 2
Link to comment
Share on other sites

@MoritzLost I didn't use worktrees yet, but one advantage that I have seen in videos is, that you have your own dependencies for each worktree. This can be a huge advantage if you use different node modules (or composer dependencies) between branches (maybe because you need an additional library for a feature branch)

  • Like 1
Link to comment
Share on other sites

@wbmnfktr Thanks! Mapping different work trees to different virtual hosts is a great idea, probably what I was missing for this to make sense to me. I'll try this out when I get the chance.

@dotnetic The different dependencies can just be tracked in the package.json / composer.json files (and the respective lock files) and installed with npm ci or composer install. Both tools cache packages locally, so it usually only takes a couple of seconds ... I guess this would be useful if you need to switch branches every couple of minutes, though I can't think of a workflow that would require that much switching 😄

  • Like 2
Link to comment
Share on other sites

6 hours ago, MoritzLost said:

Mapping different work trees to different virtual hosts is a great idea, probably what I was missing for this to make sense to me.

Exactly that was kind of a game changer for me.
I switched my config settings, kept another database for branch/tree version1 and went from there.

I was able to switch between the old site and each and every new instance/feature set of it.
In total 6 branches/trees but it was worth it.

Relates to the last project in which I used worktrees.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...