TieDad
TieDad

Reputation: 9879

how to handle this git rebase issue?

I'm developing a new feature, so I create a new branch, like this:

A--B--C--D              master branch
         \
          \-1--2--3     my feature branch

But given people is keeping adding code to master branch, I want to always to get latest code of master branch. Note, my feature is in a stand along directory, so there will be no conflict when rebase or merge to master. What I want is:

A--B--C--D--E--F
               \
                \-1--2--3--4

What git command should I use? Note that, I have pushed my feature branch to remote repository.

Upvotes: 2

Views: 75

Answers (1)

VonC
VonC

Reputation: 1323263

You can use the command

git pull --rebase

Since you need to rebase on top of master (instead of origin/feature), you can also break that into:

git fetch
git rebase origin/master

(assuming your current branch is your feature branch)

Upvotes: 5

Related Questions