In git, how do I pull from my branch's parent branch?
Here's my setup:
$ git branch -a
develop
* feature/myBranch
remotes/origin/HEAD -> origin/develop
remotes/origin/develop
remotes/origin/feature/myBranch
remotes/origin/master
BitBucket shows that develop has a change to a file that I need to pull into my workspace. I've committed other changes to my workspace, but I can't build or commit without this change.
Here's what I've tried:
$ git fetch
$ git pull
Already up to date. (I knew this wouldn't work)
$ git pull origin
Already up to date.
$ git pull origin
Already up to date.
$ git pull origin feature/myBranch
From https://myServer.com/myData
* branch feature/myBranch -> FETCH_HEAD
Already up to date.
Develop is my parent branch, so it shouldn't be hard to do.
CodePudding user response:
first you are on myBranch if not then write a command
git checkout myBranch
Now you can take a pull from develop using this command
git pull origin develop
CodePudding user response:
You can create a Pull Request
and Merge
from develop
to feature/myBranch
to be sync with latest changes in develop
branch.