Locate Branches the Commit is On Search the reflog for the commit. git reflog show --all | grep a871742 References Finding what branch a Git commit came from