Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sync master (base) branch code to feature (topic) branch using visual studio code

Tags:

git

How to pull master branch changes over a feature branch using git bash or visual studio code ?

There is a master branch, from which I created feature branch. I have made changes and also pushed my changes to feature branch. Assume master branch is updated with code changes by other developers. Now I need to get updated master branch code to my Feature branch. How to proceed? Provide solutions with git cmd or visual studio code IDE.

like image 766
swank Avatar asked Apr 23 '26 07:04

swank


2 Answers

A classic process would be to

git checkout master
git pull
git checkout feature
git merge master

(alternatively, depending on your workflow, rebase instead of merge)

like image 75
Romain Valeri Avatar answered Apr 25 '26 02:04

Romain Valeri


In visual studio code, use source control icon -> click Pull from -> click the repository path -> click master branch name.

At bottom of the visual studio code click on sync option to pull and push changes to feature branch.

This will update feature branch with master branch code.

like image 44
swank Avatar answered Apr 25 '26 04:04

swank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!