Git Setup

How to initialise a Git repository for FlexUI, configure a remote on GitHub, set up a proper .gitignore, and establish a release tagging workflow.

Initialise Repository

  1. 1
    Initialise git in your project root
    cd flexui
    git init
    git add .
    git commit -m "chore: initial commit"
  2. 2
    Create a repository on GitHub

    Go to github.com/new. Set visibility, add a description, and leave the "Initialize repository" option unchecked (you already have local files).

  3. 3
    Add the remote and push
    git remote add origin https://github.com/fluxenite/flexui.git
    git branch -M main
    git push -u origin main

.gitignore

Keep your repository clean by excluding build artifacts, caches, and environment files:

.gitignore
# Dependencies
node_modules/

# Build output
dist/
.flexui-cache/

# OS / Editor
.DS_Store
Thumbs.db
.idea/
.vscode/

# Environment secrets
.env
.env.local
.env.*.local

# Logs
*.log
npm-debug.log*

# Coverage
coverage/
.nyc_output/

Add Remote

If you already have a local repo and want to add or change the remote:

# View current remotes
git remote -v

# Add a new remote
git remote add origin https://github.com/fluxenite/flexui.git

# Change existing remote URL
git remote set-url origin https://github.com/fluxenite/flexui.git

# Use SSH instead of HTTPS
git remote set-url origin git@github.com:fluxenite/flexui.git

Branch Strategy

The recommended branching model for open-source packages:

BranchPurpose
mainStable, production-ready code. Protected.
devIntegration branch for features before release.
feat/<name>New feature branches — merge into dev.
fix/<name>Bug fix branches — merge into dev or main.
release/<version>Staging branch for release preparation.
# Create and switch to a feature branch
git checkout -b feat/streaming-ssr

# Merge back to dev
git checkout dev
git merge feat/streaming-ssr --no-ff
git push

Release Tags

Tag each release with a version number. Tags trigger the npm publish workflow and provide a clear history of releases.

# Annotated tag (recommended)
git tag -a v1.1.3 -m "Release v1.1.3"
git push origin v1.1.3

# Push all tags at once
git push origin --tags

# List existing tags
git tag --list

# Delete a tag (if you made a mistake)
git tag -d v1.1.3
git push origin --delete v1.1.3

Commit Conventions

FlexUI follows the Conventional Commits specification. This enables automated changelogs and semantic versioning.

feat: add streaming SSR support
fix: resolve memory leak in scheduler
docs: update router API reference
chore: bump esbuild to 0.21
refactor: simplify virtual DOM diffing
test: add hooks integration tests
perf: reduce bundle size by 8%
BREAKING CHANGE: remove deprecated render() API
Automate changelog generation
Tools like conventional-changelog or release-drafter can auto-generate your CHANGELOG.md from commit messages.