简体   繁体   中英

Update Git remote branch with another remote branch

I'm working with Azure Git.

I have created a remote branch of the master on which I've created a local branch and worked on. Is there a way to update the remote branch from the master (which has progressed since then) without a PR, but by some merging done from Azure itself?

You can merge from your remote master to your remote branch if you wanted to. But I'd recommend the following : In your local branch run the following command to merge whats in your remote master to your local branch :

git pull origin master --rebase

This will pull all updates from master to your local branch, then apply your local commits over that. You can follow the instructions in the command line to fix any merge conflicts if there are any. Once thats done, you should ideally compile and run your code, and if everything is good push your changes to your remote branch with the --force flag

git push origin <your-branch-name> --force

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM