Skip to content

How do you clear a conflict state on a single file #325

Closed
@yishaigalatzer

Description

@yishaigalatzer

I have a state where conflicts are created by the msysgit pull command.

It's fairly easy (though not well documented) to get the state of the file by iterating the index entries and comparing paths (thanks @ethomson!).

foreach (var entry in _repository.Index)
{
if (entry.StageLevel != StageLevel.Staged)
{
yield return entry.Path;
}
}

I also noticed (correctly or not) that if I unstage the conflicted file, I can now proceed to commit the changes in the file on disk.

However I couldn't find a way to do a similar when the user decides to delete the conflict file. (Well except for ugly hacks I'm embarrassed to mention here).

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions