Urgent: XCode 13 unable to delete lines of code

I deleted Derived data of project and after that I can't remove any line of code in the project. The moment I delete any character in function, XCode 13 is duplicating that line as seen in the below image.

And I can't delete even a comment. The code doesn't even build now. What do I do? A big chunk of commented code I tried to delete, it deletes but then shows that deleted code again upwards in another function.

The blue bar on the left side of your screenshot indicates you're looking at a diff of changes. Xcode 13 has revised source control management, including how changes can be viewed, such as this in-line comparison. For an overview of Xcode's source control diffing features, please see the documentation. To configure this behavior in your project, look for these icons shown in my screenshot — the double arrow, as well as the menu.

.

Urgent: XCode 13 unable to delete lines of code
 
 
Q