I have the following git status
and I need to get rid of pluginA
and pluginB
:
# 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
I have a repository with these branches that are shared between the client and myself:
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.
You got a conflict because git found a directory (vendor/plugins/pluginA
directory in development
) when a file was found in merge's remote (vendor/plugins/pluginA
file in master
).
Since it isn't possible to merge a file with a directory, git makes a copy of the master data in vendor/plugins/pluginA~master
(to avoid losing data), and leaves you with a conflict that needs to be resolved manually.
Move/rename/delete/copy/edit/whatever those files to get your code to the desired state, then git add
the changes and git commit
the conflict resolution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With