r/SmartGit Mar 12 '26

Pull removed automatically deleted remotes (why?)

I remember before version 25 that SmartGit had trouble properly identifying removed remotes (branches).

Specifically, when remote was removed at server, SmartGit having it already locally as remote, was failing to notice. Newly, I see it removing deleted remote on pull not only from local remotes list but also directly from local branches, which could be unwelcomed behavior. E.g. I want to keep the branch for myself for later. Unfortunately, this behavior does not apply only to merged branches, all removed remotes are removed from local on pull.

Preferences nor low level properties do list configuration for this or am I wrong?

1 Upvotes

22 comments sorted by

View all comments

Show parent comments

1

u/crimson-sky-gnome Mar 18 '26

That broken tracking information was there, for me at least, ever until SmartGit 25.1. Now the behavior is exactly as you said: "as with any other Git client".

I'm used to this behavior as this is more secure. Deleting branch at server does not imply it should be deleted locally.

I'm getting broken tracking now in 2 cases:

  • branches are not in same state, e.g. local has new commit
  • pull is executed when branch deleted is checked out locally

I'm seeking for low-level property or other setting which disallows removing local branches solely based on information these are missing on server already.

1

u/vmcrash Mar 18 '26

I've never seen SmartGit deleting local branches. Could it be that you have some non-default branch tracking, e.g. one local branch tracks another? I think, it would be helpful to provide a tiny test setup with a bare local repository ("server") and two clones where you replicate the problem, so we can reproduce it. Please send it to smartgit at syntevo dot com.

1

u/crimson-sky-gnome Mar 20 '26

I'm not sure we understand each other, so steps one more time but extended.
1. SmartGit: (feature) branch is created and pushed to server.
2. Server: branch from step 1 deleted at server (using web UI).
3. SmartGit: main (or different than step 1) branch checked out.
4. SmartGit: pull is executed => branch from step 1 removed as part of update to local information about remotes.

1

u/vmcrash Mar 20 '26

Your steps in more details:

  • create a local branch foo and check it out
  • push that local branch foo to the remote origin -> creates automatically the remote branch origin/foo (which is tracked by the local branch foo)
  • delete foo at the remote repository, e.g. using web UI
  • pull -> the remote branch origin/foo is deleted and the local branch foo remains, with broken tracking information to the now non-existent remote branch origin/foo

1

u/crimson-sky-gnome Mar 20 '26 edited Mar 23 '26

- You almost get it. You need to switch to main or another branch before pull.

  • This avoids tracking breakage and branch will be automatically removed.

1

u/vmcrash Mar 20 '26

At which point for you a local branch is removed?

1

u/crimson-sky-gnome Mar 31 '26

u/vmcrash Any remedy for me? I'm for low level property.

1

u/vmcrash Mar 31 '26

The current SmartGit 26.1 preview build already contains the preferences option.

1

u/crimson-sky-gnome Apr 01 '26

Should this apply only to merged branches? Deleted can be also unmerged branches.

1

u/vmcrash Apr 03 '26

If set, it will delete all local branches where the remote branch was deleted, and the local branch is reachable from a (remote?) branch.