---
title: "Correcting detached head problems with Git"
date: "2024-02-14T06:18:38+00:00"
summary: "Learn how to fix detached head problems in Git with step-by-step instructions. Create branches, commit changes, and push to origin repositories for seamless Live Development workflow."
image:
type: "page"
url: "/acquia-cloud-platform/correcting-detached-head-problems-git"
id: "fd31481b-ef77-4f85-97ca-15b07b5be9e9"
---

Important

Live Development is not available for environments running on the [Cloud Next](/acquia-cloud-platform) infrastructure.

When working in [Live Development mode](/acquia-cloud-platform/manage-apps/code/livedev), attempting to push your changes using `git push` can occasionally fail with a message similar to the following:

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

This _detached head state_ occurs when a specific commit is checked out instead of a branch. You cannot commit to a commit—only to a branch. To correct this, use the following steps to create a branch for your commits:

1.  From a command prompt window, create a branch by using a command similar to the following:
    
        git checkout -b [branchname]
    
2.  Commit your changes to the branch.
3.  Push the branch that you created into the origin Git repository:
    
        git push origin [branchname]
    

Your **Environment** webpage will display the branch for [deployment](/acquia-cloud-platform/manage-apps/code) to each of your environments.