if a checkout from branch A and call the new branch B, then merge branch A into branch C…
- User
if a checkout from branch A and call the new branch B, then merge branch A into branch C and delete branch A, what happens with branch B?
Assistant
Branch B remains completely unaffected and continues to exist normally.
When you checkout from branch A to create branch B, you're creating a new branch that points to the same commit as branch A at that moment. From that point forward, branch B has its own independent existence - it's not dependent on branch A continuing to exist.
Here's what happens in your scenario:
- Branch B still points to the commit it was created from
- Branch B retains all the commit history that was accessible when it was created
- You can continue to work on branch B, make new commits, merge it elsewhere, etc.
- The only thing that changes is that the branch name "A" no longer exists, but all the commits and history are still there (now accessible through branch B and branch C)
Think of branch names as moveable labels pointing to commits in the Git history graph. Deleting a branch name just removes the label - it doesn't delete the underlying commits as long as they're still reachable from other branches.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.