# Manage Commit Visibility

Valohai fetches all commits from your repository, but you can filter which ones appear in the execution creation dialog. This is useful for hiding old branches, experimental work, or irrelevant commits.

## Why Manage Commits?

Over time, repositories accumulate commits from:

* Old feature branches
* Abandoned experiments
* Development work that's no longer relevant

Hiding these commits makes it easier to:

* Find the commits you actually care about
* Avoid accidentally running outdated code
* Keep the UI clean for your team

**This only affects visibility in Valohai—nothing is deleted from Git.**

## Access Commit Management

Navigate to commit management:

1. Open your Valohai project
2. Go to **Settings** → **Repository** → **Manage Commits**

You'll see all fetched commits with filtering options.

## Filter by Branch

Hide all commits from specific branches:

1. Enter the branch name in the filter
2. Select the commits you want to hide
3. Click **Hide selected**

<figure><img src="/files/FF1lqrhx7IBFmnaV1Ixn" alt=""><figcaption></figcaption></figure>

**Common branches to hide:**

* Old feature branches that have been merged
* Experimental branches that didn't work out
* Personal development branches

## Filter by Date Range

Hide commits before or after specific dates:

**Hide commits before a date:**

1. Set the **To** date to one day before your cutoff
   * Example: To hide commits before Sept 12, 2022, set **To** to Sept 11, 2022
2. Click **Filter**
3. Select all commits
4. Click **Hide selected**

**Hide commits after a date:**

1. Set the **From** date to one day after your cutoff
   * Example: To hide commits after Sept 12, 2022, set **From** to Sept 13, 2022
2. Click **Filter**
3. Select all commits
4. Click **Hide selected**

> :bulb: **Date filtering quirk:** The filter doesn't include the date you set. To hide commits on Sept 12, set the date to Sept 11.

## Unhide Commits

Made a mistake? Unhide commits:

1. Go to **Settings** → **Repository** → **Manage Commits**
2. Check the **Show hidden commits** box
3. Select commits to unhide
4. Click **Unhide selected**

## Effect on Execution Dialogs

After hiding commits, the **Commit** dropdown shows only visible commits:

<figure><img src="/files/8PZ82c1NhSXMQItpDtdS" alt=""><figcaption></figcaption></figure>

Hidden commits:

* Don't appear in the **Create Execution** dialog
* Can't be selected for new executions
* Are still in Git (nothing is deleted)

**Existing executions** that used hidden commits are not affected—you can still view and reproduce them.

## Use Cases

**Clean up old branches**

* Hide commits from branches that were merged months ago
* Keep only `main` or `develop` visible

**Focus on recent work**

* Hide commits older than 6 months
* Reduce clutter when selecting commits

**Hide personal experiments**

* Filter out branches like `test-*` or `debug-*`
* Keep the UI clean for the team

**Organize by project phase**

* Hide commits from an old model architecture
* Focus on the current approach

## Best Practices

**Hide, don't delete**

* Commits remain in Git and can be unhidden
* This is safer than force-pushing or deleting branches

**Hide old branches after merging**

* Once a feature branch is merged, hide it
* Keep `main` visible for production work

**Communicate with your team**

* Hiding commits affects everyone on the project
* Let teammates know before hiding large date ranges

**Review periodically**

* Every few months, review visible commits
* Hide outdated work to keep the UI manageable

**Don't hide recent work**

* Keep at least the last 3-6 months visible
* You may need to reference recent experiments

## Troubleshooting

**"I can't find a commit I know exists"**

* It may be hidden—check **Show hidden commits**
* You may need to fetch the repository to see new commits

**"Hiding commits didn't work"**

* Make sure you clicked **Hide selected** after filtering
* Refresh the page to see changes

**"I accidentally hid important commits"**

* Check **Show hidden commits** and unhide them
* Hidden commits aren't deleted—they're just invisible

**"The date filter isn't working as expected"**

* Remember: The date you set is **not included** in the filter
* To hide commits on Sept 12, set the date to Sept 11

## Fetch New Commits

After hiding old commits, remember to fetch new ones:

1. Go to **Settings** → **Repository**
2. Click **Fetch Repository**

New commits appear automatically in the execution dialog.

## Next Steps

* [Connect Your Repository](/git-integration/connect-repo.md) if you haven't already
* [Use .vhignore](/git-integration/use-vhignore.md) to exclude files from workers
* [Automate with Webhooks](/automation-overview/triggers/webhooks/examples/github-integration.md) to fetch automatically


---

# 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.valohai.com/git-integration/manage-commits.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.
