1

I have only one commit in the feature branch, ie. feature_1 and this feature branch changes are merged with the develop_1 branch. Now, I want to rebase this commit with the develop_2 branch.

How can I achieve that?

Please help.

shobhana
  • 11
  • 1
  • 2
    It's usually not a good idea to rebase commits once they have been merged. Make sure you really want to do this. Draw a graph of what you have now (see [Pretty Git branch graphs](https://stackoverflow.com/q/1057564/1256452)). – torek Sep 08 '21 at 02:24

1 Answers1

0

The ideal course of action would be to merge again:

Merge feature_1 to develop_2 branch.

That is easier than rebasing feature_1, which would duplicate/replicate its commit on develop_2.

This assumes that feature_1 was actually merged in develop_1 (as stated in the OP), not rebased on top of develop_1.
Because if it was initially rebased, a second merge would not work (as it would effectively merge develop_1 in develop_2)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250