What happens in the child branch if I delete a parent branch in git

前端 未结 2 360
失恋的感觉
失恋的感觉 2021-02-05 08:23

I am planning to rename a branch in my git repository. I found out that the easy way to do that is to make a new branch from that branch and give it the desired name.

A

2条回答
  •  执念已碎
    2021-02-05 09:07

    Simply use git format-patch origin -o {output_folder}.

    After getting all the patches out, go to the master and create a new branch.

    Then apply those patches as so: git am {output_folder}/{patch_name}.patch.

    Then after verifying you didn't loose any info, you can delete the old branch with git Branch -D {name_old_branch}

提交回复
热议问题