views:

208

answers:

1

Long story, made short: I have the following in my git status and need to get rid of the two plugins below:

# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   unmerged:   vendor/plugins/pluginA
#   unmerged:   vendor/plugins/pluginB

The longer story: I have a repository with a few branches that is shared between us and the client:

master (client version of the code)
production (our production version of the code)
development (our development version of the code)

Changes have been made in master that we need to start using and I need to leave production and development alone. I've created a new "merge" branch (based on development) and merged the code from master. Unfortunately it has left us with the two plugin issues above. These were removed in the master but are still in the development branch. When merging I had messages like:

CONFLICT (directory/file): There is a directory with name vendor/plugins/pluginA in HEAD. Adding vendor/plugins/pluginA as vendor/plugins/pluginA~master

Since I am trying to get the master version, how can I just remove the plugins? Seems like most other deleted files were merged correctly.

Thanks!

+1  A: 

You got a conflict because git found a directory ("vendor/plugins/pluginA" directory in development's HEAD) when a file was found in merge's remote ("vendor/plugins/pluginA" file in master) and doesn't want to mess with it, so git renames it to "vendor/plugins/pluginA~master", and leaves you with a conflict.

Move/rename/delete/copy/edit/whatever those files to get your code to the desired state, then "git add" the files and "git commit" the merge until the next conflict ;).

KurzedMetal