Visitar URL original
vercel gitSkip to content

vercel git

The vercel git command is used to manage a Git provider repository for a Vercel Project, enabling deployments to Vercel through Git.

When run, Vercel CLI searches for a local .git config file containing at least one remote URL. If found, you can connect it to the Vercel Project linked to your directory.

Learn more about using Git with Vercel.

terminal
vercel git connect

Using the vercel git command to connect a Git provider repository from your local Git config to a Vercel Project.

To connect a repository that isn't in your local Git config, or to connect from a directory that isn't a Git repository, pass the repository URL:

terminal
vercel git connect https://github.com/user/repo.git

Using the vercel git connect command with the URL of a Git provider repository.

terminal
vercel git disconnect

Using the vercel git command to disconnect a connected Git provider repository from a Vercel Project.

These are options that only apply to the vercel git command.

The --yes option skips the confirmation prompts of vercel git connect and vercel git disconnect. For example, Vercel CLI asks before it replaces a repository that's already connected to the project, and before it disconnects a repository. To make the change without a prompt, add --yes:

terminal
vercel git connect --yes

Using the vercel git connect command with the --yes option.

The --project option selects the Vercel Project by name or ID. Without it, vercel git uses the project linked to your current directory. Pass --project to manage the Git connection of a different project, or to run the command from a directory that isn't linked:

terminal
vercel git connect --project my-project

Using the vercel git connect command with the --project option.

The following global options can be passed when using the vercel git command:

For more information on global options and their usage, refer to the options section.

Last updated March 17, 2026

Was this helpful?

supported.