4.9 KiB
Version Control User Guide
Introduction
The version control system allows you to track changes, create branches, and merge content updates across ThrillWiki. This guide explains how to use the version control features effectively.
Basic Concepts
Branches
A branch is a separate line of development that allows you to make changes without affecting the main content. Think of it like a draft version of your content.
- Main Branch: The default branch containing the live, published content
- Feature Branches: Temporary branches for developing new content or making significant changes
- Active Branch: The branch you're currently working on
Changes
Changes represent modifications to content:
- Adding new information
- Updating existing content
- Removing outdated content
Merging
Merging combines changes from one branch into another, typically from a feature branch back into the main branch.
Using Version Control
1. Version Control Panel
The version control panel appears at the top of editable pages and shows:
- Current branch
- Branch selector
- Action buttons (Create Branch, Merge, etc.)
2. Creating a Branch
- Click "Create Branch" in the version control panel
- Enter a branch name (e.g., "update-park-details")
- Add an optional description
- Click "Create"
Branch naming conventions:
- Use lowercase letters
- Separate words with hyphens
- Be descriptive (e.g., "add-new-rides", "update-park-history")
3. Switching Branches
- Open the branch selector in the version control panel
- Select the desired branch
- Click "Switch Branch"
Note: You'll see a warning if you have unsaved changes.
4. Making Changes
- Ensure you're on the correct branch
- Edit content normally
- Save changes
- Changes are tracked automatically
The version control panel shows:
- Number of changes
- Last update time
- Change status
5. Viewing History
- Click "History" in the version control panel
- See a list of changes with:
- Timestamp
- Author
- Description
- Branch
- Click any change to see details
6. Merging Changes
- Switch to the target branch (usually main)
- Click "Merge" in the version control panel
- Select the source branch
- Review changes
- Click "Merge Changes"
7. Handling Conflicts
If conflicts occur during merging:
- The conflict resolution dialog appears
- Review conflicting changes
- Choose which version to keep or combine them
- Click "Resolve Conflicts"
- Complete the merge
Best Practices
When to Create a Branch
Create a new branch when:
- Making substantial content updates
- Adding new sections
- Reorganizing information
- Testing new features
Branch Management
- Keep branches focused on specific tasks
- Delete branches after merging
- Regular merge changes from main to stay current
- Use descriptive branch names
Change Management
- Make atomic, related changes
- Write clear change descriptions
- Review changes before merging
- Test content in preview mode
Collaboration
- Communicate branch purpose to team members
- Coordinate on shared branches
- Review changes before merging
- Resolve conflicts together when needed
Common Tasks
Updating a Park Page
- Create a branch (e.g., "update-park-info")
- Make changes to park information
- Preview changes
- Merge back to main when ready
Adding New Rides
- Create a branch (e.g., "add-new-rides-2025")
- Add ride information
- Add photos and details
- Review and merge
Content Reorganization
- Create a branch (e.g., "reorganize-sections")
- Rearrange content
- Update navigation
- Test thoroughly
- Merge changes
Troubleshooting
Common Issues
Unable to Create Branch
- Check permissions
- Verify branch name is valid
- Ensure no conflicts with existing branches
Merge Conflicts
- Don't panic! Conflicts are normal
- Review both versions carefully
- Choose the best content
- Test after resolving
Lost Changes
- Check branch history
- Review recent changes
- Contact administrator if needed
Getting Help
- Click the "Help" button in the version control panel
- Contact administrators for complex issues
- Check documentation for guidance
Version Control Status Icons
| Icon | Meaning |
|---|---|
| 🟢 | Current branch |
| 🔄 | Pending changes |
| ⚠️ | Merge conflicts |
| ✅ | Successfully merged |
| 🔒 | Protected branch |
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Switch Branch | Ctrl/Cmd + B |
| Create Branch | Ctrl/Cmd + Shift + B |
| View History | Ctrl/Cmd + H |
| Merge Branch | Ctrl/Cmd + M |
| Save Changes | Ctrl/Cmd + S |
