Netbeans fails to merge because of ignored files

I try to merge my git repository with a remote one and what i get is this:

Merge Result: Failed
Merge of HEAD with remote-rep/master failed because of these files:

  • Finding out the version of git on remote server
  • Git issue with Visual Studio 2015
  • How to remove origin from git repository
  • Git Woes: edited on windows, now w/ problems on linux
  • Does git commit --amend include the files that were in the last commit?
  • What's the recommended usage of a Git symbolic reference?
  • The whole folder that file is in is shown as ignored by git. I checked it in .gitignore and it is there. Those files have never been added on commit also.

  • Reattach a “Detached” fork in Github?
  • Prevent pull/push from an obsolete Git repo and redirect to a new one
  • '!' does not exclude file in .gitignore
  • How to find the current git branch in detached HEAD state
  • How to resolve a timeout exception when TeamCity fetches changes from a SSH Git repository
  • git merge conflict after git amend - “Your branch and 'origin/master' have diverged”
  • 2 Solutions collect form web for “Netbeans fails to merge because of ignored files”

    The file could have been added by others in the remote repo.
    If you really think the file must be ignored, then do this.

    1. Move the file (local) to some other location.
    2. Merge the remote repo with your master.
    3. Untrack the file. git rm /path/to/some/file.jpg
    4. Commit and Push.
    5. Move back your local file to the previous location.
    6. Inform your colleagues about this change. 😉

    The best way to avoid this issue is by committing .gitignore file. So that everyone shares same .gitignore file.

    Please try git command in shell instead of the options in Netbeans.
    You will see the difference!

    Git Baby is a git and github fan, let's start git clone.