I have a remote repo with two branches, one for myself and another for my partner's codes.
To merge the differences, I do git pull origin partnersBranch
on my local branch. This automatically merges the differences and mark files with conflict markers where auto merge fails.
The problem is, if there is some code in my branch, which does not exist in my partner's branch, git pull
overwrites my codes with my partner's code where it should have merged them.
For example, my branch has a new feature. When I git pull origin partnersBranch
, the new feature does not exist anymore.
What I can do to prevent this to happen?