Home Ask Login Register

Developers Planet

Your answer is one click away!

Em Ae February 2016

Rebasing with preserving merges

I am new to Git and I haven't been able to practice it a lot. So i am asking this question here before i issue this command to our main repo.

I am at branch featureX and now i want to rebase with master (with all the merge history) ... and then push it up stream into my branch. I have read couple of things and i came up with the following set of commands

  1. git rebase --preserve-merges master featureX
  2. git push -u origin featureX

However, given there is no place i can test it out I am not sure if its the right command to issue on our main repo.


das-g February 2016

Rebasing rewrites history. So if you want to preserve history exactly, don't rebase. Merge instead.

Post Status

Asked in February 2016
Viewed 3,847 times
Voted 12
Answered 1 times


Leave an answer

Quote of the day: live life