1

I have a branch that was created from an existing branch. However I don't remember which existing branch was used. How can I find out which branch this was?

Evanss
  • 20,529
  • 79
  • 252
  • 460

1 Answers1

0

Branches do not have parents.

Commits have parents.

A branch name is a strictly repo-local temporary label for a currently-particular commit.

You can achieve the effect you want locally with local tracking:

git branch -t testing master

will set branch testing up to track branch master, so a git pull with that checked out will merge from that by default, git rebase will use that by default, and so forth -- and git branch -avv will show any configured tracking.

Any correspondence between branch names and configuration in your repo and any other repo is just convention and collaboration in action.

jthill
  • 48,781
  • 4
  • 72
  • 120