why this happening ...
It's happening because there is a conflict between a rename and a delete.
This answer is not very helpful, but it is as helpful as possible, given what you have told us. In particular, one of the things you did tell us is wrong:
when I try to push my develop it returns the CONFLICT (rename/delete)
error
git push
never does a merge, and the conflict occurs on a merge. Your output here:
* branch master -> FETCH_HEAD
is from git pull
, not git push
. The pull command means run git fetch
, then run a second Git command and the default second Git command is usually git merge
, so that part makes sense: you ran git pull
, which ran git merge
, which encountered this rename/delete conflict.
Perhaps you mean to ask "what are some examples that cause a rename/delete conflict", which is answerable: see, e.g., git rename/delete confusion.
... and how to resolve this?
You, as the (smart) human programmer, must decide what the correct set of files in the final merge is to be. Git is a dumb simple program, following some simple rules; those rules have hit a problem.
See, e.g., Git - what does CONFLICT (rename/delete) mean? and git - merge conflict when local is deleted but file exists in remote and How do I fix a merge conflict due to removal of a file in a branch? Some of these are about modify/delete conflicts, rather than rename/delete, but in the end the process is always the same:
- Git tried to merge, using its dumb and simple rules.
- These dumb and simple rules failed. Git stopped in the middle of the merge.
- Your job is now to fix the mess Git left behind. Figure out which files should exist and what should be in those files.
Once you have the right set of files, with the right contents, use git add
and/or git rm
to tell Git these are the right files. Then run git merge --continue
to finish the in-progress merge.