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, and more.
This node is beneficial in automation scenarios where Git version control actions need to be integrated into CI/CD pipelines, deployment workflows, or any automated process that requires interaction with Git repositories. For example, it can automate code commits after generating files, synchronize branches between remotes, or fetch logs for auditing purposes.
Specifically, the Log operation retrieves the commit history log of a Git repository, which can be used to analyze recent changes or generate reports on repository activity.
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 (true to skip output, false to capture it). |
Output
The node outputs an array of items, each containing a json object with the following fields:
stdout: The trimmed standard output of the executed Git command (e.g., the commit log text for the Log operation).stderr: The trimmed standard error output if any occurred during command execution.
If the property Skip Stdout is enabled, the output JSON will be empty ({}) because the command output is ignored to prevent buffer overflow issues.
No binary data output is produced by this node.
Dependencies
- Requires Git to be installed and accessible via the command line on the machine running n8n.
- Uses Node.js child process utilities to execute Git commands.
- Supports authentication via an API key credential or custom username/password for operations like clone, push, and pull.
- No additional external services are required beyond Git and optional credentials for authentication.
Troubleshooting
- MaxBuffer Errors: When executing commands that produce large output (like
git log), the node might hit the maximum buffer size limit. Enabling Skip Stdout avoids capturing output and prevents these errors but results in no output data. - Unsupported Operation Error: If an invalid or unsupported operation name is provided, the node throws an error indicating the operation is not supported.
- Authentication Failures: For operations requiring authentication (clone, push, pull), incorrect or missing credentials may cause failures. Ensure valid API keys or username/password combinations are configured.
- Filesystem Path Issues: The specified repository path must exist and be accessible. Permissions or incorrect paths can cause command failures.
- Temporary File Cleanup: For patch operations, temporary files are created and deleted automatically. Failure to delete these files could indicate permission issues.