# Troubleshooting Git errors

Omlet uses the Git history to designate when a component is created and updated. If your project does not have the Git setup or no commits exist, you may encounter the following issues.

## Could not find git root

This error indicates that Git is not initialized in the repository. If you encounter <mark style="color:red;">`Could not find git root`</mark> error, follow the steps below to resolve the issue.

Ensure your project contains a `.git` file and confirm that it is sourced from a Git repository. If you manually downloaded the project as a `.zip` file, we'd recommend cloning the repository directly from your Git instance.

```bash
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
```

If you don't have Git set up, you can run the below command sequence to resolve the issue. This will initiate the Git for your project and add an initial commit.

```bash
git init 
git add . 
git commit
```

## Could not find commit in git repo or Git Util error

These errors indicate that no commit is found or there is an issue with the Git utility. To resolve these issues, ensure there are commits in the Git repository.

If commits exist already, make sure that your project is not a shallow clone. You can run the below command to unshallow.

```bash
git pull --unshallow
```

{% hint style="info" %}
**Still need help?**

If the issue persists, you can contact us at <support@omlet.dev>.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omlet.dev/help/troubleshooting/troubleshooting-git-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
