Question
How does git know when a branch's upstream is gone?
Say I have a branch on git, my-branch
. I push it to a remote, then delete it from said remote, and leave my local copy remaining.
git checkout -b my-branch
git push origin my-branch
git push origin --delete my-branch
Git then seemingly knows nothing of an "origin/my-branch
", but gives indications that it knows that there was once an origin/my-branch
, such as in .git/COMMIT_EDITMSG
:
# Your branch is based on 'origin/my-branch', but the upstream is gone.
My question is, how is git deducing that there once was an origin/my-branch
that is now gone? Where is this information stored/computed from?