[Git] HEAD is detached from the master branch

Hi everyone,

I’m Noura and I’m a TSE in Looker Support at Google. Today’s topic will be around what to do when you see that  your code in production is up to date but when you switch to development mode you see a branch named HEAD out of nowhere. 

HEAD is a special pointer that point to the latest checkout. In this situation it looks like that the HEAD was detached from master.

We usually want to attached back the HEAD to master by running the command below git checkout master, but for Looker-Hosted instance it can really be an option, so we will do it from the Looker UI.

Here are the step to reattached the HEAD to master.

  1. Create a new branch that is based on the branch that have the changes you want to push to master
  2. Add a simple change like a comment (e.g # hi)
  3. Commit and push the changes to remote
  4. Depending if your have Pull Request required or not, you merge the branch to master.
  5. Pull the changes
  6. Deploy to production

Now you can see that these two branch are in sync. 

0 0 987