Reputation: 9512
Here's what happened: I pulled some changes and that apparently created a conflict. I resolved the conflict by deleting the conflicting lines in the involved file. I usually don't deal with conflicts, so I am not sure where to go from here. Now I can't stash and pull because
file.ext: needs merge
What am I supposed to do?
edit: Output of git status
:
On branch some_branch
Your branch is up to date with 'origin/some_branch'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: xxx.xy
modified: xxx.xy
modified: xxx.xy
modified: xxx.xy
modified: xxx.xy
modified: xxx.xy
modified: xxx.xy
Unmerged paths:
(use "git restore --staged <file>..." to unstage)
(use "git add <file>..." to mark resolution)
both modified: file_with_conflict.xy
Untracked files:
(use "git add <file>..." to include in what will be committed)
some_file
some_file
some_file
some_file
some_file
some_file
some_file
some_file
some_file
some_file
some_file
some_file
Upvotes: 0
Views: 163
Reputation: 1035
In git, merges are just a type of commit. So to mark conflicts as resolved, you add them to the staged changes after fixing the conflicts.
git add path/to/conflicted/file.cpp
Once you've resolved all your conflicts in this way, you finish the merge by committing.
git commit
Alternatively, to cancel the merge, you can abort it to revert your local files to how they were before the conflicts.
git merge --abort
Upvotes: 3