[GH-ISSUE #661] Add per-repo option to use more conservative approach for git pull #7418

Open
opened 2026-04-27 21:05:00 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @oblivioncth on GitHub (Jul 12, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/661

Although ultimately the users responsibility, in a similar vein to #458 it would be cool if a toggle could be added to repositories that when enabled will cause komodo to use the following strategy when a git pull is needed (instead of the current reset --hard approach):

  1. git stash
  2. Change to the correct branch if not already
  3. Fetch/pull upstream changes
  4. If the branch is the same as before, git stash pop

If there are merge conflicts or other issues, then simply fail the actions with an error so the user knows they need to clean-up their local repo.

Alternatively

  1. Check if repo is the correct one, if not fail
  2. git stash if working changes
  3. Fetch/pull upstream
  4. git stash pop if stash present
  5. If merge conflicts, fail

Essentially, just expect the repo to be a state Komodo can use, and if any point a problem arises simply fail with an error instead of trying to force the repo back into a useable state.

Would help prevent the loss of WIP changes to some stacks if Komodo was being used for that purpose.

Low priority issue of course.

Originally created by @oblivioncth on GitHub (Jul 12, 2025). Original GitHub issue: https://github.com/moghtech/komodo/issues/661 Although ultimately the users responsibility, in a similar vein to #458 it would be cool if a toggle could be added to repositories that when enabled will cause komodo to use the following strategy when a `git pull` is needed (instead of the current `reset --hard` approach): 1) `git stash` 2) Change to the correct branch if not already 3) Fetch/pull upstream changes 4) If the branch is the same as before, `git stash pop` If there are merge conflicts or other issues, then simply fail the actions with an error so the user knows they need to clean-up their local repo. Alternatively 1) Check if repo is the correct one, if not fail 2) `git stash` if working changes 3) Fetch/pull upstream 4) `git stash pop` if stash present 5) If merge conflicts, fail Essentially, just expect the repo to be a state Komodo can use, and if any point a problem arises simply fail with an error instead of trying to force the repo back into a useable state. Would help prevent the loss of WIP changes to some stacks if Komodo was being used for that purpose. Low priority issue of course.
GiteaMirror added the enhancement label 2026-04-27 21:05:00 -05:00
Author
Owner

@adamflagg commented on GitHub (Dec 2, 2025):

Agreed, this is my conundrum currently if I want to run renovate more frequently Komodo's pull will erase that WIP work unless I manually stash it prior.

<!-- gh-comment-id:3604357007 --> @adamflagg commented on GitHub (Dec 2, 2025): Agreed, this is my conundrum currently if I want to run renovate more frequently Komodo's pull will erase that WIP work unless I manually stash it prior.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#7418