Commit Revert Error - this operation must be run in a work tree #11297

Closed
opened 2025-11-02 09:33:40 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wzorektom on GitHub (Jul 21, 2023).

Description

I get this error message whenever I try to revert the commit in Gitea repository.

Log:

   2023/07/21 10:06:24 ...rvices/pull/patch.go:237:AttemptThreeWayMerge() [E] Unable to run read-tree -m! Error: exit status 128 - fatal: this operation must be run in a work tree
    - fatal: this operation must be run in a work tree

Gite UI Displayed error message:

  Unable to apply patch "Error: Stdout: Stderr: Applied patch to 'README.md' with conflicts. U README.md Err: exit status 1"

Gitea Version

Version: 1.21.0+dev-340-g840830b65

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

2023-07-21_10-59-22
2023-07-21_10-40-53

Git Version

No response

Operating System

No response

How are you running Gitea?

Used one of your downloads. Runs as a Service under Win Server 2022. The issue was reproduced on your Gitea test instance.

Database

SQLite

Originally created by @wzorektom on GitHub (Jul 21, 2023). ### Description I get this error message whenever I try to revert the commit in Gitea repository. Log: 2023/07/21 10:06:24 ...rvices/pull/patch.go:237:AttemptThreeWayMerge() [E] Unable to run read-tree -m! Error: exit status 128 - fatal: this operation must be run in a work tree - fatal: this operation must be run in a work tree Gite UI Displayed error message: Unable to apply patch "Error: Stdout: Stderr: Applied patch to 'README.md' with conflicts. U README.md Err: exit status 1" ### Gitea Version Version: 1.21.0+dev-340-g840830b65 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![2023-07-21_10-59-22](https://github.com/go-gitea/gitea/assets/42735610/3bbe12ec-bd9e-492c-9a2b-fafb62e94989) ![2023-07-21_10-40-53](https://github.com/go-gitea/gitea/assets/42735610/3d535e3f-d047-4fcf-a53b-99abd7364a6b) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Used one of your downloads. Runs as a Service under Win Server 2022. The issue was reproduced on your Gitea test instance. ### Database SQLite
GiteaMirror added the issue/duplicate label 2025-11-02 09:33:40 -06:00
Author
Owner

@lunny commented on GitHub (Jul 21, 2023):

duplicated with #22236

@lunny commented on GitHub (Jul 21, 2023): duplicated with #22236
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11297