You’re in the middle of a conflicted merge (git)

Trying to update (pull) in git causes the error ‘you’re in the middle of a conflicted merge’.

To be able to get out of this error try the followng:

  1. git reset –hard HEAD
  2. git fetch origin
  3. git reset –hard origin

to reset the state, and then you should be able to use git pull as normal.

ferret installation error

Trying to install ferret with sudo gem install ferret fails with the following error:

fs_store.c:300: error: format not a string literal and no format arguments
make: *** [fs_store.o] Error 1
rake aborted!
Command failed with status (2): [make…]

As the installation was not possible by using the gem install command, the next step was to download the ferret.tar.gz file extract it and try and install the plugin manually.
It also failed with the same error message.
After some googling for the error message it seems that newer gcc versions fail for non critical errors which in this case is caused by the make options -Wformat -Werror=format-security
So if you replace the:

in the extracted folder/ext/Makefile

and then follow the original instructions as in:

$ rake ext
$ ruby setup.rb config
$ ruby setup.rb setup
# ruby setup.rb install

It should be installed correctly.