Skip to content

Git Plugin

Git integration for Confluence sync.

  • atlcli installed and configured
  • Git repository initialized
  • Git plugin enabled (atlcli plugin enable git)

The Git plugin adds Git-aware features to Confluence sync:

  • Commit messages on push
  • Branch-based sync
  • Conflict detection using Git status

The Git plugin is bundled with atlcli:

Terminal window
atlcli plugin enable git

Commit synced docs with a message:

Terminal window
atlcli wiki docs commit -m "Update API documentation"

This:

  1. Stages all changes in the docs directory
  2. Creates a Git commit
  3. Pushes to Confluence

Show sync status with Git info:

Terminal window
atlcli wiki docs status

Output includes:

  • Local changes (Git status)
  • Remote changes (Confluence modifications)
  • Conflict markers

Configure in ~/.atlcli/config.json:

{
"plugins": {
"git": {
"autoCommit": false,
"commitPrefix": "[docs] ",
"branch": "main"
}
}
}
OptionDescriptionDefault
autoCommitAuto-commit after pushfalse
commitPrefixPrefix for commit messages""
branchBranch for sync operationsmain
Terminal window
# 1. Pull latest
atlcli wiki docs pull ./docs
git status # Check for remote changes
# 2. Edit locally
# ...
# 3. Commit and push
atlcli wiki docs commit -m "Update user guide"
# This: stages, commits, pushes to Confluence
# 4. Push to Git remote
git push

Work on docs in a branch:

Terminal window
git checkout -b docs/api-update
# Edit docs...
atlcli wiki docs push ./docs
git add . && git commit -m "API updates"
git push -u origin docs/api-update
# Create PR

The Git plugin adds hooks:

  • pre-push: Checks for uncommitted changes
  • post-pull: Shows Git status after pull

Disable hooks:

{
"plugins": {
"git": {
"hooks": false
}
}
}
Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.