Branches and History
ActiveState projects support branching and version history, allowing you to experiment with different configurations while maintaining a stable main branch.
Understanding Branches
Branches allow you to:
- Experiment with different package combinations
- Test new language versions
- Isolate development work
- Maintain multiple variants of your project
Creating Branches
From the web interface:
- Go to your project’s page
- Click the Project Settings tab
- Click Branches on the left-hand side
- Click Add Child to create a new branch
- Give your branch a descriptive name
- Configure the branch settings
Working with Branches
Switch to a Different Branch
Via Web Interface:
- Go to your project’s page
- Click the Configuration tab
- Click the Branch dropdown
- Choose a branch
Via State Tool:
state switch <branch-name>
This command will only work if you are in the same directory as the project.
List Available Branches
Check Out a Specific Branch
state checkout --branch <branch-name> <org/project> <path>
For example:
state checkout --branch experimental ActiveState/Python3 ./my-project
Project History
Viewing History
Via Web Interface:
- Go to your project’s page
- Click the History tab
- View current and previous releases
- Select an earlier release to view its details
Via State Tool:
Reverting to Previous Versions
Via Web Interface:
- Go to the History tab
- Select the commit you want to revert to
- Click Revert to this Commit
- Confirm your choice by clicking Revert
Via State Tool:
The commit id can be found in the web interface under the History tab.
Downloading Earlier Releases
- Go to your project’s page
- Click the History tab
- Select the commit you want to download
- Follow the download instructions for that specific commit
Commit Management
Creating Commits
When you make changes to your project (add/remove packages, change configurations), you create commits:
Via State Tool:
This creates a commit with your local changes and syncs them to the Platform.
Viewing Commit Details
Each commit includes:
- Timestamp of the change
- User who made the change
- Description of what changed
- Package additions/removals
- Build status
Commit Messages
When pushing changes, you can add descriptive commit messages:
state push --message "Added pandas for data analysis"
Best Practices
Branch Naming
- Use descriptive names:
feature/new-ml-packages, test/python39 - Include purpose:
experimental/, production/, testing/ - Avoid spaces and special characters
Branch Strategy
- Keep
main branch stable for production use - Create feature branches for experiments
- Test thoroughly before merging changes
- Clean up unused branches regularly
History Management
- Review history before making major changes
- Use descriptive commit messages
- Tag important releases for easy reference
- Document breaking changes
Troubleshooting
Branch Not Showing
If a branch doesn’t appear:
- Refresh your web browser
- Run
state pull to sync with remote changes - Check your permissions for the project
Cannot Switch Branches
If you can’t switch branches:
- Ensure you have uncommitted local changes
- Push or discard local changes first
- Verify the branch exists and you have access
Lost Commit History
If commits seem missing:
- Check if you’re viewing the correct branch
- Verify your project permissions
- Contact support if data appears to be lost