error:The following untracked working tree files would be overwritten by merg

created at 12-29-2021 views: 54

error

I encountered a git prompt yesterday:

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

The purpose of the operation is to merge the branched program into the test branch, but the merge is unsuccessful.

solution

So I checked how to solve it on the Internet, and finally found the command line:

git clean -fd

The function of this operation is: delete files without git add,

The problem of error: The following untracked working tree files would be overwritten by … is solved after execution.

created at:12-29-2021
edited at: 12-29-2021: