Reputation: 17294
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 :)
Upvotes: 0
Views: 752
Reputation: 1
Try
git clean -fx
The -x switch will remove ignored files. maybe the file .project is ignored by your git repository, so git clean won't remove it.
Upvotes: 0
Reputation: 33197
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:
Upvotes: 2
Reputation: 37461
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.
Upvotes: 2