Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert a new branch between two existing branches

Tags:

branch

tfs

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?

like image 605
Vic Peters Avatar asked Nov 05 '22 03:11

Vic Peters


1 Answers

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.

like image 69
Taylor Lafrinere Avatar answered Nov 28 '22 03:11

Taylor Lafrinere