Skip to content

Conversation

@ybeapps
Copy link
Contributor

@ybeapps ybeapps commented Dec 22, 2025

SourceGit already have global setting for --prune that is fully synced with git config.

but sometimes there is a need to prune on demand.
I'm using it a lot - and still prefer default to be off.
I also saw there was another PR suggesting a fix for that - so it's not only my need. but my PR respects the repo config and git config - so it should not break current design.

if there will be no accepted solution - there is no way to prune-on-demand via SourceGit and I find myself everytime switch to terminal :(

the project already have global setting that is fully synced with git config.
but sometimes there is a need to prune on demand.
in these scenarios there is no way to do it via SourceGit and I find myself everytime switch to terminal
I also saw there was another PR suggesting a fix for that - but this PR respects the repo config and git config
@love-linger
Copy link
Collaborator

love-linger commented Dec 23, 2025

In earlier versions (before 8.36), it was also possible to enable the --prune option during the fetch operation. This feature was later removed.

The reason is that if the user enables fetch.prune option in the settings (either in Preferences or Repository Configure), the prune function will be enabled in the Fetch panel regardless of whether the checkbox is turned on/off (because even if the --prune parameter is not provided, git will still check the fetch.prune setting).

If one of your repositories relies on manual cleanup, I recommend that you do as follows:

  • In the Repository Configure window of that repository, disable Enable --prune on fetch
  • When needed, select the Remote that needs to be cleaned up, open the right-click menu, and choose the Prune operation

@love-linger
Copy link
Collaborator

Another reason that I do not want to add Prune option back to Fetch popup is that Pull operation may not run as excepted as Fetch (the git pull command will also depend on fetch.prune setting)

@love-linger love-linger self-assigned this Dec 23, 2025
@love-linger love-linger added the not-planned It's not planned in the future label Dec 23, 2025
@ybeapps
Copy link
Contributor Author

ybeapps commented Dec 23, 2025

This totally makes sense
If indeed we have this option in the remote list then I'm totally fine with it

I'll check soon
Thanks

@ybeapps
Copy link
Contributor Author

ybeapps commented Dec 23, 2025

works - not needed =]
(though its quite hidden feature)

@ybeapps ybeapps closed this Dec 23, 2025
@ybeapps ybeapps deleted the feature/prune-on-deman branch December 23, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants