We are working with Netbeans and sometimes get an error when pulling/pushing from git
git merge of head with origin/master failed because of these files: ".../Filename.java"
What can we do? How to solve this in netbeans? We tried everything -> commit -> pull - same error -> commit -> push - same error
no windows showing up where we can resolve the conflicts.
Edit: When I do: git pull with the git shell, then it works, the file will show me the conflict...
But if I do the git pull via netbeans, netbeans doesnt show me anything, it keeps the file as it is without putting
<<<<<< HEAD:file.java
blablabla
========
blabla
>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.java
inside.
I'd guess that file wasn't tracked, and you created it at the same time another one created it and commited it to your remote.
I'd suggest you to create a stash
, pull
changes, and then stash pop
. It would probably create a conflict (as you're saying), but it can be addressed with Netbeans' merge editor.
Just resolve the conflict and you're done.
Alternatively, you can commit your file locally, and then fetch
+ rebase
onto origin/master
(or whichever your remote branch is). You'll get the conflict again, it's almost the same as the first option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With