Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

My master branch is behind from other branches

netrootstech
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2020

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.

1 answer

0 votes
Ganesh Babu
Community Champion
January 27, 2020

Hi @netrootstech 

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?

https://blog.developer.atlassian.com/force-with-lease/?_ga=2-4239408-263583427-1580100161-702689197-1571143210

The above link might give some insights

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events