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:
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.
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.
- Move the file (local) to some other location.
- Merge the remote repo with your master.
- Untrack the file.
git rm /path/to/some/file.jpg
- Commit and Push.
- Move back your local file to the previous location.
- 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!