GIT syncing local feature branch from remote branch

Viewed 55

Maybe got some duplication with other questions, but I couldn't find another post that could answer all my questions

I have a feature branch 'features/abc' which was branch out from another remote branch (in bitbucket) 'releases/car-v2' by

In releases/car-v2
git checkout features/abc

And then I push this feature branch to remote(in bitbucket) by

git push --set-upstream origin features/abc

Verified that feature branch already existed in there (in bitbucket)

Now 'releases/car-v2' in remote got some changes, I want to pull these changes to my local feature branch 'features/abc' too

Where it is fetching when I use git pull in my local feature branch 'features/abc'?

What should I do to pull the latest changes in remote branch (in bitbucket) 'releases/car-v2' to my local feature branch 'features/abc'?

1 Answers

A normal git pull is enough, although a git pull --rebase is considered better: you would replay your local commits on top of the remote ones.

git switch features/abc
git pull --rebase
Related