Git Merge Conflict - Remote File Deleted, Local File Changed

I merged in changes from another branch but I am getting conflicts because a file has been deleted on the remote branch but has changes on local branch.

I would like to delete the file - I tried git rm path/to/file but it says file: needs merge. What is the best way of removing the file and committing the merge?


Try using the --force parameter:

git rm --force <file>

If you want to keep the file in filesystem:

git rm --cached <file>

Need Your Help

$lookup on ObjectId's in an array

mongodb mongodb-query aggregation-framework

What's the syntax for doing a $lookup on a field that is an array of ObjectIds rather than just a single ObjectId?

Different dependencies for different build profiles

java maven-2 build-process dependencies

Is it possible to have a different set of dependencies in a maven pom.xml file for different profiles?