Git Plugin
Git Plugin
Section titled “Git Plugin”Git integration for Confluence sync.
Prerequisites
Section titled “Prerequisites”- atlcli installed and configured
- Git repository initialized
- Git plugin enabled (
atlcli plugin enable git)
Overview
Section titled “Overview”The Git plugin adds Git-aware features to Confluence sync:
- Commit messages on push
- Branch-based sync
- Conflict detection using Git status
Installation
Section titled “Installation”The Git plugin is bundled with atlcli:
atlcli plugin enable gitCommands
Section titled “Commands”Commit
Section titled “Commit”Commit synced docs with a message:
atlcli wiki docs commit -m "Update API documentation"This:
- Stages all changes in the docs directory
- Creates a Git commit
- Pushes to Confluence
Status
Section titled “Status”Show sync status with Git info:
atlcli wiki docs statusOutput includes:
- Local changes (Git status)
- Remote changes (Confluence modifications)
- Conflict markers
Configuration
Section titled “Configuration”Configure in ~/.atlcli/config.json:
{ "plugins": { "git": { "autoCommit": false, "commitPrefix": "[docs] ", "branch": "main" } }}Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
autoCommit | Auto-commit after push | false |
commitPrefix | Prefix for commit messages | "" |
branch | Branch for sync operations | main |
Workflow
Section titled “Workflow”Recommended Flow
Section titled “Recommended Flow”# 1. Pull latestatlcli wiki docs pull ./docsgit status # Check for remote changes
# 2. Edit locally# ...
# 3. Commit and pushatlcli wiki docs commit -m "Update user guide"# This: stages, commits, pushes to Confluence
# 4. Push to Git remotegit pushBranch-Based Docs
Section titled “Branch-Based Docs”Work on docs in a branch:
git checkout -b docs/api-update# Edit docs...atlcli wiki docs push ./docsgit add . && git commit -m "API updates"git push -u origin docs/api-update# Create PRThe Git plugin adds hooks:
- pre-push: Checks for uncommitted changes
- post-pull: Shows Git status after pull
Disable hooks:
{ "plugins": { "git": { "hooks": false } }}Related Topics
Section titled “Related Topics”- Using Plugins - Plugin management
- Creating Plugins - Build custom plugins
- Sync Workflow - Confluence sync operations
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.