I have localhosted bitbucket.
Every time I make new repository and initialize git in that project and commit my code in master and push in master. Then i make new branch and commit changes in that branch and then push. When I merge new branch with master after creating pull request. It REPLACES my previous files in master with the new branch files instead of MERGING. Moreover my master branch is one step behind to new branch.
See what happens is that when you try to merge a branch with the master. Any changes made to the files which are already exist in the master branch will be updated under the files which where changed.
And always before trying to push the code to the repository its good to pull the changes from the remote to the local machine and then trying to push the changes to the remote.
Once you merge with the master branch, the master branch will be updated
And are you trying to force push the changes?
The above link might give some insights
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.