Skip to content

Git worktree support tools#693

Draft
lsierant wants to merge 1 commit intolsierant/intellij-settings-onlyfrom
lsierant/intellij-settings
Draft

Git worktree support tools#693
lsierant wants to merge 1 commit intolsierant/intellij-settings-onlyfrom
lsierant/intellij-settings

Conversation

@lsierant
Copy link
Contributor

@lsierant lsierant commented Jan 12, 2026

Based on PR #850

Chain of upstream PRs as of 2026-03-03

Summary

Tooling necessary to work effectively on multiple worktrees in parallel.

Requirements for perfect tooling for working with worktrees

  • you create new worktree as easy as creating a branch (one command)
  • created worktree is ready to go: context switching works, it's fully isolated from other worktrees, IDE opened from it is fully configured (operator and e2e tests works without any additional configuration)
  • it's easy to switch between worktrees (no need to regenerate contexts, sourcing venvs, etc.)

The tooling in this PR solves most of those:

  • setup_git_worktree script creates fully configured worktree with one command
  • mck cd alias allows to navigate easily between worktrees with automatic context sourcing
  • comitted run configurations and .idea files makes the IDE almost configured. Unfortunately some manual configuration is still needed in the new worktree.

What's still missing:

  • full isolation
  • creating new evg hosts for full runtime isolation
  • local operator is still clashing on the same ports when running more than one at a time
  • kubefwd, evg_host.sh tunnel is still not isolated per worktree

Changes

  • scripts/dev/setup_git_worktree.sh <branch name> - checks out new worktree in $PROJECT_DIR/../
    • automatically creates new venv
    • copies private-context and .generated/.current_context
  • scripts/aliases/mck_aliases - aliases to help switching between worktrees, with automatic context and venv sourcing
  • adds IntelliJ run configurations so after worktree creation and openining new IDE instance, there is very little manual configuration needed to have fully configured IDE

mck aliases

mck cd - worktree switcher
image
mck switch - wrapper over make switch, but it's automatically sourcing the generated envs afterwards
image
image

@lsierant lsierant self-assigned this Jan 12, 2026
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.7.1 Release Notes

Other Changes

  • Container images: Merged the init-database and init-appdb init container images into a single init-database image. The init-appdb image will no longer be published and does not affect existing deployments.

@lsierant lsierant added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jan 12, 2026
@lsierant lsierant changed the title Initialize git worktree script Tools to work with git worktrees Jan 12, 2026
@lsierant lsierant changed the title Tools to work with git worktrees Git worktree support tools Jan 12, 2026
@lsierant lsierant force-pushed the lsierant/intellij-settings branch 2 times, most recently from b278077 to edf1d74 Compare March 3, 2026 08:47
@lsierant lsierant changed the base branch from master to lsierant/intellij-settings-only March 3, 2026 08:49
@lsierant lsierant force-pushed the lsierant/intellij-settings-only branch from b887210 to b3163fb Compare March 3, 2026 21:32
@lsierant lsierant force-pushed the lsierant/intellij-settings branch from edf1d74 to 81e6ab2 Compare March 3, 2026 21:32
@lsierant lsierant force-pushed the lsierant/intellij-settings-only branch from b3163fb to faef93f Compare March 6, 2026 12:50
@lsierant lsierant force-pushed the lsierant/intellij-settings branch from 81e6ab2 to 1a4f33d Compare March 6, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant