error: The following untracked working tree files would be overwritten by merge: #5202

Closed
opened 2026-02-05 09:48:05 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @YamiGhor on GitHub (Feb 28, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

When I try to update from v24.12 to 25.02 I got this error.

Already tried doing git reset --hard or git config core.fileMode false

Exact BookStack Version

v24.12

Log Content

user@bookstack:/var/www/bookstack$ sudo git pull origin release
From https://github.com/BookStackApp/BookStack

  • branch release -> FETCH_HEAD
    Updating 6d2cd20e8..268e35343
    error: The following untracked working tree files would be overwritten by merge:
    app/Console/Commands/AssignSortRuleCommand.php
    app/Search/SearchTextTokenizer.php
    app/Sorting/BookSortController.php
    app/Sorting/BookSortMap.php
    app/Sorting/BookSortMapItem.php
    app/Sorting/BookSorter.php
    app/Sorting/SortRule.php
    app/Sorting/SortRuleController.php
    app/Sorting/SortRuleOperation.php
    app/Sorting/SortSetOperationComparisons.php
    app/Sorting/SortUrl.php
    app/Theming/ThemeController.php
    app/Util/FilePathNormalizer.php
    database/factories/Sorting/SortRuleFactory.php
    database/migrations/2025_01_29_180933_create_sort_rules_table.php
    database/migrations/2025_02_05_150842_add_sort_rule_id_to_books.php
    eslint.config.mjs
    lang/ku/activities.php
    lang/ku/auth.php
    lang/ku/common.php
    lang/ku/components.php
    lang/ku/editor.php
    lang/ku/entities.php
    lang/ku/errors.php
    lang/ku/notifications.php
    lang/ku/pagination.php
    lang/ku/passwords.php
    lang/ku/preferences.php
    lang/ku/settings.php
    lang/ku/validation.php
    resources/icons/auto-sort.svg
    resources/js/components/sort-rule-manager.ts
    resources/js/services/dual-lists.ts
    resources/views/settings/categories/sorting.blade.php
    resources/views/settings/sort-rules/create.blade.php
    resources/views/settings/sort-rules/edit.blade.php
    resources/views/settings/sort-rules/parts/form.blade.php
    resources/views/settings/sort-rules/parts/operation.blade.php
    resources/views/settings/sort-rules/parts/sort-rule-list-item.blade.php
    tests/Commands/AssignSortRuleCommandTest.php
    tests/Search/EntitySearchTest.php
    tests/Search/SearchIndexingTest.php
    tests/Search/SearchOptionsTest.php
    tests/Search/SiblingSearchTest.php
    tests/Sorting/BookSortTest.php
    tests/Sorting/MoveTest.php
    tests/Sorting/SortRuleTest.php
    Please move or remove them before you merge.
    Aborting

Hosting Environment

Ubuntu Server 24.04.1 LTS

Originally created by @YamiGhor on GitHub (Feb 28, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario When I try to update from v24.12 to 25.02 I got this error. Already tried doing _git reset --hard_ or _git config core.fileMode false_ ### Exact BookStack Version v24.12 ### Log Content user@bookstack:/var/www/bookstack$ sudo git pull origin release From https://github.com/BookStackApp/BookStack * branch release -> FETCH_HEAD Updating 6d2cd20e8..268e35343 error: The following untracked working tree files would be overwritten by merge: app/Console/Commands/AssignSortRuleCommand.php app/Search/SearchTextTokenizer.php app/Sorting/BookSortController.php app/Sorting/BookSortMap.php app/Sorting/BookSortMapItem.php app/Sorting/BookSorter.php app/Sorting/SortRule.php app/Sorting/SortRuleController.php app/Sorting/SortRuleOperation.php app/Sorting/SortSetOperationComparisons.php app/Sorting/SortUrl.php app/Theming/ThemeController.php app/Util/FilePathNormalizer.php database/factories/Sorting/SortRuleFactory.php database/migrations/2025_01_29_180933_create_sort_rules_table.php database/migrations/2025_02_05_150842_add_sort_rule_id_to_books.php eslint.config.mjs lang/ku/activities.php lang/ku/auth.php lang/ku/common.php lang/ku/components.php lang/ku/editor.php lang/ku/entities.php lang/ku/errors.php lang/ku/notifications.php lang/ku/pagination.php lang/ku/passwords.php lang/ku/preferences.php lang/ku/settings.php lang/ku/validation.php resources/icons/auto-sort.svg resources/js/components/sort-rule-manager.ts resources/js/services/dual-lists.ts resources/views/settings/categories/sorting.blade.php resources/views/settings/sort-rules/create.blade.php resources/views/settings/sort-rules/edit.blade.php resources/views/settings/sort-rules/parts/form.blade.php resources/views/settings/sort-rules/parts/operation.blade.php resources/views/settings/sort-rules/parts/sort-rule-list-item.blade.php tests/Commands/AssignSortRuleCommandTest.php tests/Search/EntitySearchTest.php tests/Search/SearchIndexingTest.php tests/Search/SearchOptionsTest.php tests/Search/SiblingSearchTest.php tests/Sorting/BookSortTest.php tests/Sorting/MoveTest.php tests/Sorting/SortRuleTest.php Please move or remove them before you merge. Aborting ### Hosting Environment Ubuntu Server 24.04.1 LTS
OVERLORD added the 🐕 Support label 2026-02-05 09:48:05 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 28, 2025):

Hi @YamiGhor,

Before anything, backup your entire /var/www/bookstack directory to retain a copy of files as the following guidance can be dangerous as it will be changing files.

With a backup done, the following can usually revert app files back to their original state.
Warning: This will remove any files/folders that you may have added manually, which are not expected in the BookStack app codebase.

# Ignore permission changes
git config core.fileMode false

# Restore track files to their original state
git reset --hard

# Clean leftover files which may have been causing issues
git clean -d -f

Then run the normal update commands.

If that still fails, then please share the full output of git log -n 1 and git status right after re-running the above commands (but before re-running normal update commands).

@ssddanbrown commented on GitHub (Feb 28, 2025): Hi @YamiGhor, Before anything, backup your entire `/var/www/bookstack` directory to retain a copy of files as the following guidance can be dangerous as it will be changing files. With a backup done, the following can usually revert app files back to their original state. Warning: This will remove any files/folders that you may have added manually, which are not expected in the BookStack app codebase. ```bash # Ignore permission changes git config core.fileMode false # Restore track files to their original state git reset --hard # Clean leftover files which may have been causing issues git clean -d -f ``` Then run the normal update commands. If that still fails, then please share the full output of `git log -n 1` and `git status` right after re-running the above commands (but before re-running normal update commands).
Author
Owner

@YamiGhor commented on GitHub (Feb 28, 2025):

That worked!
Thank you so much for your hard work @ssddanbrown 🙏

@YamiGhor commented on GitHub (Feb 28, 2025): That worked! Thank you so much for your hard work @ssddanbrown 🙏
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5202