Automatically refresh worktrees after main repo's fetch

Sync 3 years ago 0


  • I have a repo, project.git, with several branches:
    • Branch1
    • Branch2
    • Branch3
  • project.git is marked as favourite.
  • Branch1 is checked out.
  • Branch2/3/etc is also checked out using "git worktree add".
    • This is also added into SmartGit repositories, but not marked as favourite.
  • project.git (Branch1) is currently opened in SmartGit. When a fetch (either manual or background) happens, I can see changes in both Branch1 and Branch2 from the [Branches] window. However, the [Repositories] window does not reflect the change for Branch2 worktree (no green or orange arrow). It will only update if I open that "repo", or if I mark it as favourite.


  • Add an optional flag to:
    • After a fetch, scan if the repo contains worktrees.
    • If yes, are those worktrees added into the [Repositories] window?
    • If yes, refresh the worktrees.
      • All of this is local, so it shouldn't be expensive


  • I don't want to burden the server by marking worktrees as favourite (excessive background fetch). The data is already fetched by the main repo anyway.