> ## Content Index
> Fetch the complete content index at: https://www.techielass.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Push an Empty Commit in Git
- URL: https://www.techielass.com/how-to-push-an-empty-commit-in-git/
- Published: 2022-06-14T07:01:27.000Z
- Updated: 2025-09-30T10:55:31.000Z
- Description: Learn how to create an empty commit in Git, why you might need one, and best practices to use them safely.
- Author: Sarah Lean
- Tags: Git for everyone, Git, Azure DevOps, GitHub, DevOps

There are a lot of Git commands. I'm always discovering a new and useful one. This time I have found one that allows you to push an empty commit to a repository. 

## Why push an empty Git commit?

Git doesn't allow you to push commits without making changes, and there are times when you don't want to make changes but perhaps trigger a pipeline or job or build that is attached to a repository. 

This is where pushing an empty commit can come in handy. If you can't manually trigger your build or pipeline, staying in the command line prompt and pushing an empty commit can mean triggering the build or pipeline without making any changes. 

## How to push an empty commit

It is a fairly straight forward command, using the --allow-empty flag. 

```bash
git commit --allow-empty -m "Empty commit"

```

Very similar to pushing a commit when you've made changes to your code. But using this flag you can push a commit without making any changes. 😊

💡

**I also have a YouTube channel! Do not forget to subscribe* [**here*](https://www.youtube.com/techielass?sub%5Fconfirmation=1&ref=techielass.com)**.*