Actions26
Overview
The node "Git Extended" allows users to run various Git commands directly from n8n workflows. It supports a wide range of Git operations such as cloning repositories, committing changes, pushing and pulling branches, managing branches and tags, applying patches, stashing changes, and more.
This node is beneficial in automation scenarios where you want to integrate Git version control actions into your workflow without leaving the n8n environment. For example, it can be used to automate deployment pipelines by committing and pushing code changes, or to synchronize repositories by pulling updates regularly.
Practical examples:
- Automatically commit and push changes after generating files in a workflow.
- Clone a repository to a specific directory for further processing.
- Create, rename, or delete branches programmatically.
- Stash local changes before running other automated tasks.
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) of the executed Git command, trimmed of whitespace. If the "Skip Stdout" property is enabled, the output JSON will be empty to prevent buffer overflow issues.
Example output structure when not skipping stdout:
{
"stdout": "<command output>",
"stderr": "<command error output>"
}
If binary data were involved (not applicable for stash operation), it would be summarized accordingly, but this node primarily deals with textual Git command outputs.
Dependencies
- Requires Git to be installed and accessible on the system where n8n runs.
- Uses Node.js child process utilities to execute Git commands.
- Supports authentication via an API key credential or custom username/password for certain operations like clone, push, and pull.
- No additional external services are required beyond Git and optional credentials.
Troubleshooting
Common Issues:
- Incorrect repository path may cause commands to fail; ensure the path exists and is accessible.
- Authentication failures if credentials are incorrect or missing for operations requiring them.
- Buffer overflow errors when commands produce very large outputs; enable "Skip Stdout" to mitigate.
- Temporary patch files created during patch application might fail to delete if permissions are insufficient.
Error Messages:
Unsupported operation <operation>: The specified Git operation is not implemented or recognized.Command failed with exit code <code>: The Git command returned a non-zero exit status indicating failure.Commit ID is required: For operations like cherry-pick, revert, or reset, a commit hash must be provided.Failed to parse the repository URL: Indicates malformed URL or invalid credentials embedded in the URL.
To resolve these, verify input parameters, ensure correct credentials, and check file system permissions.