I’m a newbie in using git version control, I got this error when running git pull origin master, this is the error :
From /opt/mygit/abc
* branch master -> FETCH_HEAD
error: Untracked working tree file 'nbproject/private/rake-d.txt' would be overwritten by merge. Aborting
Am I miss something? thanks in advance. 😀
It would appear that you have the file
nbproject/private/rake-d.txtin your local repository, but not tracked by git.Meanwhile, it has been added to the remote repository since your last pull, so doing a pull would overwrite that file, and thus git is warning you that that would happen and aborting the pull.
To resolve this, you’ll need to go and either delete or rename the file.
If you want to automate this, run a
git cleanto clean out the folder of untracked files (that is, delete them). It might be a good idea to rungit clean -nfirst, though, which merely lists the files it’s going to delete, letting you see if there’s anything important it plans on deleting.Alternatively, you could add the file to the repository (remember to commit it), and then pull. git will then try to merge your local copy with the remote one.