# Automating Neon branch creation with Githooks

DevFeed: [Automating Neon branch creation with Githooks](<https://devfeed.tech/articles/automating-neon-branch-creation-with-githooks-5003.md>)

Original publisher: [Read original article](<https://neon.com/blog/automating-neon-branch-creation-with-githooks>)

Author: Raouf Chebri

Published: 2023-05-25T21:33:03Z

Content type: article

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [Script](<https://devfeed.tech/topics/script.md>), [API](<https://devfeed.tech/topics/api.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Development](<https://devfeed.tech/topics/development.md>), [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [community](<https://devfeed.tech/tags/community.md>), [database](<https://devfeed.tech/tags/database.md>), [development](<https://devfeed.tech/tags/development.md>), [docker](<https://devfeed.tech/tags/docker.md>), [git](<https://devfeed.tech/tags/git.md>), [product](<https://devfeed.tech/tags/product.md>), [workflow](<https://devfeed.tech/tags/workflow.md>)

## AI overview

This article explains how to use a Git post-checkout hook script and the Neon API to automatically create a Neon database branch when a Git branch is created. It presents the approach as a way to simplify local development and avoid maintaining a local Postgres instance and seed scripts. The supplied text is truncated before the complete implementation is shown.

## Source excerpt

In this blog post, we'll walk through creating a Githook script that automates the creation of Neon branches every time a new Git branch is created. This is possible because Neon provides an API to manage your projects, branches, and most other operations supported by the Neon Co...