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
  • 23,390
  • 94
  • 282
  • 505

1 Answers1

1

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
  • 55,082
  • 5
  • 77
  • 137