Actions26
Overview
The node "Git Extended" allows running various Git commands directly from n8n workflows by executing Git CLI commands on a specified local repository path. It supports a wide range of Git operations such as cloning repositories, committing changes, listing commits, managing branches, pushing and pulling changes, applying patches, and more.
This node is beneficial in automation scenarios where you want to integrate Git version control actions into your workflow without manually running Git commands. For example, it can be used to automate deployment pipelines, synchronize code repositories, or manage branches and commits programmatically.
Practical examples:
- Automatically commit and push changes after generating files in a workflow.
- Clone a repository, make modifications, and push updates back.
- List recent commits for audit or reporting purposes.
- Create, rename, or delete branches as part of a CI/CD process.
Properties
| Name | Meaning |
|---|---|
| Repository Path | Filesystem path to run the Git command from. For clone, the repository will be created inside this path. |
| Skip Stdout | Whether to ignore command output to avoid maxBuffer errors (useful for large outputs). |
Output
The node outputs JSON data containing the standard output (stdout) and standard error (stderr) strings resulting from the executed Git command, unless Skip Stdout is enabled. In that case, the output JSON will be empty.
Output structure example when not skipping stdout:
{
"stdout": "<trimmed command output>",
"stderr": "<trimmed error output>"
}
If Skip Stdout is true, the output JSON will be {}.
No binary data output is produced by this node.
Dependencies
- Requires Git to be installed and accessible via the command line on the machine where n8n runs.
- Uses Node.js child process execution to run Git commands.
- For authenticated operations (clone, push, pull), an API key credential or custom username/password authentication can be configured.
- No additional external services are required beyond Git and optional credentials for authentication.
Troubleshooting
- MaxBuffer Errors: Large Git command outputs may cause buffer overflow errors. Enable the
Skip Stdoutproperty to avoid capturing output and prevent these errors. - Unsupported Operation Error: If an invalid or unsupported operation name is provided, the node throws an error indicating the operation is unsupported.
- Authentication Failures: For operations requiring authentication, ensure valid credentials are provided. Incorrect usernames, passwords, or API keys will cause Git commands to fail.
- File System Path Issues: The
Repository Pathmust be correct and accessible. Invalid paths or permission issues will cause command failures. - Temporary Patch File Cleanup: When applying patches from text input, temporary files are created and deleted automatically. Failure to clean up might indicate file system permission problems.