tags:

views:

43

answers:

2

Hi, I'm getting this git error and I don't really get what it means, nor how I can fix it:

(v_env)[nubela@nubela-desktop searchplus]$ git pull origin master
From file:///home/nubela/Workspace/_git/searchplus
 * branch            master     -> FETCH_HEAD
Updating 38f3d5b..fe6028c
error: Untracked working tree file 'searchplus/.project' would be overwritten by merge.  Aborting
(v_env)[nubela@nubela-desktop searchplus]$

I've done the following but to no avail:

git clean -f -d
git reset --hard HEAD

Anyone can help enlighten me? Thanks :)

+2  A: 

It basically means exactly what it says. You have a file in your working copy that is not in your repo, but is in the remote repo. Merging in the remote would clobber your copy of the file. The easiest way you can resolve this is by committing the file or removing it.

Daenyth
+1  A: 

You (or your IDE) has created a file named "searchplus/.project". Somewhere in the upstream Git repository, this file has been also created. Git refuses to do the merge step unless:

  1. Your .project file is deleted.
  2. Your .project file is committed, so a merge can be attempted.
Yann Ramin