hash update - bug fix for branches (#83865)
hash updates for xla were failing because the current pinned hash is a branch, so the git command for getting the date couldn't find the branch due to not having a local version of the branch. Fixed by checking out the branch to make sure it exists locally.
example of failure: https://github.com/pytorch/pytorch/runs/7913835742?check_suite_focus=true
Test plan:
made it pull request trigger and ran, to get this:
https://github.com/pytorch/pytorch/runs/7959221184?check_suite_focus=true
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83865
Approved by: https://github.com/zengk95