Pushing Tokens
GitFig uses a Git-like workflow to track changes and push them to GitHub. Changes are automatically detected, then you stage, commit, and push.
Time: 5 minutes Difficulty: Beginner
The Commit Workflow
GitFig follows a workflow similar to Git:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Make Changes │ ──► │ Unstaged Changes│ ──► │ Staged Changes │ ──► │ Commits to Push │ ──► GitHub
│ in Figma │ │ (auto-detected) │ │ (ready to commit)│ │ (local commits) │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
Stage ──► Commit ──► Push ──►
Three Sections
The GitFig panel shows three sections for tracking changes:
| Section | Purpose |
|---|---|
| Unstaged Changes | Changes detected in Figma but not yet staged |
| Staged Changes | Changes ready to be committed |
| Commits to Push | Local commits waiting to be pushed to GitHub |
Step 1: Make Changes in Figma
Edit your Variables or Styles in Figma:
- Change a color value
- Add a new variable
- Update a description
- Delete a variable
GitFig automatically detects changes every 3 seconds and displays them in the Unstaged Changes section.
Change Types
| Icon | Meaning |
|---|---|
| + (green) | New variable or style added |
| ~ (yellow) | Existing variable or style modified |
| - (red) | Variable or style removed |
Step 2: Stage Changes
Select which changes you want to include in your next commit:
- Click Stage next to individual changes
- Or click Stage All to stage everything
Staged changes move to the Staged Changes section.
You can Unstage changes if you change your mind. Click the unstage button next to any staged change.
Step 3: Create a Commit
Once you have staged changes, create a local commit:
Enter Commit Details
| Field | Purpose |
|---|---|
| Commit message | Short summary of changes (required) |
| Extended description | Detailed explanation (optional) |
Commit message - A brief summary line (50 characters or less recommended):
- "Update primary brand color to orange"
- "Add new spacing tokens for mobile"
- "Fix contrast issue on secondary color"
Extended description - Use this for additional context:
- Why the change was made
- Related design decisions
- Links to design specs or tickets
Click Create Commit
Click Create Commit to save your changes as a local commit. The commit moves to the Commits to Push section.
Creating a commit does NOT push to GitHub yet. Commits are stored locally and can be pushed later.
Step 4: Push to GitHub
When you're ready to push your commits to GitHub:
- Review the commits in the Commits to Push section
- Click the Push X Commits button
- Wait for the push to complete
GitFig pushes all pending commits to your current branch on GitHub.
What Happens During Push
- GitFig exports your current Variables and Styles to JSON
- Creates a commit on GitHub with your message
- Updates the baseline so new changes can be detected
Managing Commits
View Commit Details
Click on a commit in the Commits to Push section to expand it and see:
- Commit message and description
- List of changed items
- When it was created
Delete a Commit
If you want to discard a commit before pushing:
- Expand the commit
- Click the trash icon
- The changes will reappear in Unstaged Changes
Push Options
Direct Push (Default)
Commits directly to your current branch. Best for:
- Personal projects
- Quick iterations
- When you have push access
Create Pull Request
Instead of pushing directly, create a PR for review:
- Push your changes to a feature branch first
- Click Create Pull Request in the PR section
- Enter PR title and description
- Click Create PR
Best for:
- Team projects requiring code review
- Protected branches that require PRs
The Create Pull Request option only appears when you're on a feature branch, not on main or master.
Conflict Detection
If GitHub has commits you haven't pulled, GitFig shows a warning before push.
Options:
- Push anyway - Your changes may overwrite remote changes
- Pull first - Recommended: sync before pushing
What Gets Exported
Variables → JSON
Variables are exported in W3C Design Tokens format:
{
"primary": {
"$value": "#FF6600",
"$type": "color",
"$description": "Primary brand color"
},
"spacing-sm": {
"$value": 8,
"$type": "number"
}
}
Variable Types
| Figma Type | JSON $type |
|---|---|
| COLOR | "color" |
| FLOAT | "number" |
| STRING | "string" |
| BOOLEAN | "boolean" |
Nested Variables
Variable names with / become nested JSON:
| Variable Name | JSON Structure |
|---|---|
brand/primary | {"brand": {"primary": {...}}} |
spacing/sm | {"spacing": {"sm": {...}}} |
Cross-Device Support
Your commits are stored in the cloud, so you can:
- Create commits on one device
- Push them from another device
- See pending commits on any device with access
Troubleshooting
Changes not appearing in Unstaged
- Wait a few seconds - detection runs every 3 seconds
- Check that you have file mappings configured
- Try closing and reopening the plugin
"Push failed: permission denied"
- Check you have write access to the repository
- Branch may be protected - try creating a PR instead
- Token may have expired - sign out and back in
Committed changes reappearing in Unstaged
- This shouldn't happen with the latest version
- If it does, try pulling to reset the baseline
Best Practices
Write Clear Commit Messages
| Good | Bad |
|---|---|
| "Update button colors for dark mode" | "changes" |
| "Add new spacing tokens (4, 8, 12, 16)" | "update tokens" |
| "Fix contrast issue on secondary color" | "fix" |
Use Extended Descriptions for Context
Add an extended description when:
- The change needs explanation beyond the summary
- You want to link to design specs or tickets
- Multiple related changes are bundled together
Commit Often
Small, frequent commits are better than large, infrequent ones.
Pull Before Push
Always pull latest changes before pushing to avoid conflicts.
Next Steps
- Work with branches for parallel development
- Create PRs for team reviews