Git Workflow for Code Editor
Collaborate on documentation using Git workflows with Documentation.AI
Git Workflow for Code Editor
Use Git for collaboration and version control when working on Documentation.AI projects. Changes pushed to your connected repository automatically trigger builds and deployments.
Documentation Git Workflow
Basic Workflow
Documentation.AI connects to your Git repository and automatically builds when you push changes:
- Edit content in your code editor
- Commit changes with descriptive messages
- Push to your repository
- Documentation.AI builds and deploys automatically
Repository Setup
# Clone your connected repository
git clone https://github.com/your-org/docs.git
cd docs
Repository structure:
docs/
├── documentation.json # Site configuration
├── getting-started/
│ └── introduction.mdx
└── api/
└── authentication.mdx
Branching for Documentation
Feature Branch Workflow
Use branches for documentation changes:
# Create feature branch
git checkout -b add-webhook-guide
# Edit documentation files
# Make changes in your editor
# Commit and push
git add .
git commit -m "Add webhook setup guide"
git push origin add-webhook-guide
Branch Naming
Use descriptive branch names:
add-api-docs- New documentationupdate-quickstart- Content updatesfix-broken-links- Bug fixesrestructure-nav- Navigation changes
Committing Changes
Commit Messages
Write clear, descriptive commit messages:
# Good examples
git commit -m "Add OAuth authentication guide"
git commit -m "Fix broken links in API section"
git commit -m "Update quickstart with new examples"
# Avoid
git commit -m "Update docs" # Too vague
git commit -m "WIP" # Not descriptive
Using Editor Git Features
VS Code: Use Source Control panel (Ctrl+Shift+G)
Cursor: Use built-in Git panel with AI-suggested commit messages
- Review changes in diff view
- Stage specific files
- Write descriptive commit messages
- Push directly from editor
AI-Enhanced Workflow: If you're using AI coding agents like Cursor or Windsurf to help write documentation, use our helpful prompts to generate content that follows Documentation.AI conventions and includes proper component formatting.
Team Collaboration
Pull Request Workflow
- Create branch for your changes
- Edit documentation in your code editor
- Update navigation in
documentation.jsonif needed - Commit and push changes
- Create pull request on your Git platform
Documentation.AI automatically generates preview builds for pull requests.
Review Guidelines
Review checklist:
- Content accuracy and clarity
- Navigation updates if new pages added
- Internal links work correctly
- Front matter complete
- Images display properly
Merge Conflicts
Resolve conflicts in your code editor:
- Pull latest changes from main branch
- Merge or rebase your feature branch
- Edit conflicted files using editor's merge tools
- Commit resolved conflicts
Documentation.AI Integration
Automatic Builds
Documentation.AI monitors your connected repository:
- Push to main → Production build and deployment
- Pull request → Preview build for review
- Branch push → Preview build (if configured)
Build Status
Monitor builds in your Documentation.AI dashboard:
- View build logs and status
- Access preview URLs for branches
- Check deployment history
Branch Previews
Every pull request gets a preview URL for testing changes before merging to production.
Best Practices
Documentation Workflow
- Use feature branches for all documentation changes
- Write descriptive commit messages that explain what changed
- Update navigation when adding new pages
- Test preview builds before merging to main
- Keep commits focused on related changes
Team Coordination
- Communicate major structural changes
- Use issues to track documentation tasks
- Review pull requests for accuracy and clarity
- Merge conflicts - coordinate on
documentation.jsonchanges
Next Steps
- Organization: Structure your documentation files
- Images & Media: Manage visual content with Git
- Publishing: Understand the deployment process
- Troubleshooting: Resolve Git and sync issues