Pushing Tokens
Pushing exports your Figma Variables and Styles to JSON and commits them to GitHub.
Time: 3 minutes Difficulty: Beginner
How Push Works
When you click Push, GitFig:
- Reads Variables and Styles from Figma
- Converts them to W3C Design Tokens JSON format
- Creates a commit with your message
- Pushes to your current branch on GitHub
Figma GitFig GitHub
───── ────── ──────
Variable Collection ───► Export JSON ────────► colors.json
├── primary: #0066FF Format tokens commit: "Update colors"
├── secondary: #6B7280 Create commit push to main
└── background: #FFFFFF
Perform a Push
Step 1: Make Changes in Figma
Edit your Variables or Styles in Figma:
- Change a color value
- Add a new variable
- Update a description
Step 2: Click Push
Click the Push button in GitFig.

Step 3: Enter Commit Message
Write a descriptive commit message:

Good commit messages:
- "Update primary brand color to orange"
- "Add new spacing tokens for mobile"
- "Fix typo in typography descriptions"
Step 4: Push to GitHub
Click "Push to GitHub" to commit and push.
Step 5: Verify on GitHub
Open your repository on GitHub to see the new commit:

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": {...}}} |
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:
- Click the dropdown arrow next to Push
- Select "Create Pull Request"
- Enter PR title and description
- Select base branch (usually
main) - Click "Create PR"

Best for:
- Team projects
- Design reviews
- Protected branches
Conflict Detection
If GitHub has commits you haven't pulled, GitFig shows a warning:

Options:
- Push anyway - May cause merge conflicts
- Pull first - Recommended: sync before pushing
- View changes - See what's different on GitHub
Files Updated
Push updates the JSON files based on your mappings:
| Mapping | File Updated |
|---|---|
colors.json → Variables | Updates colors.json |
spacing.json → Variables | Updates spacing.json |
Push only updates files you have mappings for. Other files in the repo are unchanged.
Commit History
Each push creates a Git commit. View history:
- On GitHub: Repository → Commits
- In GitFig: Shows last sync commit SHA
Troubleshooting
"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
"No changes to push"
- No Variables have changed since last sync
- Check you're editing the correct collection
JSON formatting different than expected
- GitFig always exports in W3C format
- Other formats are converted on export
- Formatting/whitespace may change
Large commits taking long
- Many variables = larger JSON files
- Network affects upload speed
- Consider splitting into multiple files
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" |
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