kertosis
kertosis

Reputation: 1483

What's the correct way to rebase my new version branch?

I have the next version of my code base that I've been working on that's on the newVersion branch. I believe what I want to do is rebase newVersion with my master branch. Basically I'd like to see all the commits on the newVersion branch in order, and then the commits on master branch. To Illustrate I have two branches:

newVersion        master
commitA Jan 1     commitX Jan 2
commitB Jan 2     commitY Jan 3
commitC Jan 3
commitD Jan 4

What I want (I think) is to view the commit history as thus:

commitD <- newVersion (version 2)
commitC
commitB
commitA
commitY <- master (version 1)
commitX

Does this make sense? Is this what I want or do I want something different? What's the git command I want to use given those branch names?

Upvotes: 2

Views: 81

Answers (2)

manojlds
manojlds

Reputation: 301137

git rebase master newVersion

should do it

Upvotes: 0

wilhelmtell
wilhelmtell

Reputation: 58677

git checkout newVersion
git rebase master

Upvotes: 2

Related Questions