How to solve DIRTY_WORKTREE

Asked

Viewed 368 times

4

I’m trying to merge the gitusing the eclipse, but it presents me with an error:

DIRTY_WORKTREE "file name".

I’ve tried to reverse the commit and resetar, but neither option works.

  • If you use on the command line git status which output is displayed?

  • Try to delete the affected files and pull again.

1 answer

1

Enter a shell until your Pository.

Typo git status to view the files modified since the last commit. Typo git diff to see the differences if you want.

2 options:

Commit to "clear" the Repository:

git add -A
git commit -m "Messagem das modificações"

OR

Delete the modifications:

git reset HEAD --hard

Afterwards, the Repospository will be cleaned and the merge will be possible.

PS: To cancel a merge not yet commited:

git reset --merge

Browser other questions tagged

You are not signed in. Login or sign up in order to post.