Vic Peters
Vic Peters

Reputation: 448

Insert a new branch between two existing branches

I currently have two branches, Parent(Main) and Child(Release). I need to inject a new branch between Parent and Child, making it Parent(Main), Child(Intermediate), and Grandchild(Release). I know I can accomplish this through the following steps:

  1. Rename Release to Intermediate
  2. Create a new branch from Intermediate and call it Release

Unfortunately, the branch rename process has done unexpected things in the past with change history. Is there any alternative?

Upvotes: 5

Views: 1103

Answers (1)

Taylor Lafrinere
Taylor Lafrinere

Reputation: 3104

Renaming is the proper way to go here and you are correct that renaming the root of a branch can cause problems in future merges. There is a good article here that describes the potential problems and how to work around them.

Upvotes: 2

Related Questions