There are times when I am unable to "Sync now" on bitbucket when it is several commits behind, and bitbucket will prompt me to resolve some conflicts from the command line. Here are the steps I take to move my "master" branch forward so it is not out of sync with my main "develop" branch.
Command Line (Will need write permissions)
Bitbucket will provide the commit hash for DETACHED HEAD. You can also find the latest commit hash using git log.- git checkout master
- git reset --soft <latest commit hash in your `git log`>
- git merge --squash --strategy-option theirs remotes/origin/develop
- git commit -m "Move master forward to be in sync with develop"
- git push -u --force origin master
Bitbucket Branch Web UI
- Navigate to the "master" branch in your repository
- Click on "Sync now"
- You should see a commit message of "Merged develop into master" and you should be all set!
How to synchronize your branch on bitbucket
Reviewed by JJ The Engineer
on
1:07 PM
Rating:
Thank you for posting the valuable information.
ReplyDeleteDevOps Online Training
Thanks for sharing this wonderful content.its very useful to us.It was very interesting and meaningful.This is incredible,I feel really happy to have seen your webpage.keep posting such useful information.
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course
Full Stack Training in Bangalore | Certification | Online Training Course
Full Stack Training in Hyderabad | Certification | Online Training Course
Full Stack Developer Training in Chennai | Mean Stack Developer Training in Chennai
Full Stack Training
Full Stack Online Training
I am really happy with your blog because your article is very unique and powerful for new research on the content on synchronization.
ReplyDeleteDevOps Training in Chennai
DevOps Online Training in Chennai
DevOps Training in Bangalore
DevOps Training in Hyderabad
DevOps Training in Coimbatore
DevOps Training
DevOps Online Training