Em Ae
Em Ae

Reputation: 8724

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.

Upvotes: 0

Views: 41

Answers (1)

das-g
das-g

Reputation: 9994

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

Upvotes: 1

Related Questions