Skip to content

Add 'Reset to Remote' button in Repository Management#532

Open
Getslow6 wants to merge 4 commits into
redimp:mainfrom
Getslow6:Reset-to-remote-git-repository
Open

Add 'Reset to Remote' button in Repository Management#532
Getslow6 wants to merge 4 commits into
redimp:mainfrom
Getslow6:Reset-to-remote-git-repository

Conversation

@Getslow6

Copy link
Copy Markdown
Contributor

The repository management functionality allows to sync your repository with a remote repository. However, if the remote repository already contains files (e.g. from an earlier wiki and you're setting up Otterwiki from scratch) it is not possible to pull the files, as they will conflict with the files in the local repository (.e.g. home.md).

The solution would be to hard reset to the remote using git reset --hard origin/main. This overrides the local git repository with the remote repository, after which you can continue with keeping Otterwiki in sync with the remote repository.

This PR includes a new 'Reset to Remote' button on the repository management page:
image

Clicking it will first show a warning, similar to the force push button.

Tests have been included as well.

@redimp

redimp commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Hey @Getslow6, thanks for this PR. I will test and review as soon as I have time. Please bring patience and keep up the good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants