Project Setup
Setup the project and configure the Git remotes.
Project Setup
Setup the project and configure the Git remotes.
Automatic Setup (recommended)
The kit provides a script to automatically clone the repository and setup the project.
Please run the following command to setup the project:
pnpm turbo gen setupThis command will set your Github username, prepare the git remotes, and perform some checks.
Should this command fail, you can manually setup the project by following the steps below.
Manual Setup (if the automatic setup fails)
If the command above fails, you can manually setup the project by following the steps below.
Setting Github username
Please run the following command to set your Github username:
git config user.username <your-github-username>Understanding Git Remotes
In a typical setup, you'll have:
- origin - Your personal repository (where you push your code)
- upstream (optional) - The original kit repository (for pulling updates)
Run the following command to check your current remotes and understand the relationship between them:
git remote -vPulling Updates from Upstream
To get the latest changes from the original kit repository:
# Fetch latest changesgit fetch upstream# Merge changes into your main branchgit checkout maingit merge upstream/main# Or use pull (fetch + merge)git pull upstream mainBest practice: Pull upstream updates regularly (e.g., daily) to stay current with bug fixes and new features.
Setting Up Post-Merge Hook
Automatically run pnpm install after pulling updates:
# Create post-merge hookcat > .git/hooks/post-merge << 'EOF'#!/bin/bashecho "Running pnpm install after merge..."pnpm installEOF# Make it executablechmod +x .git/hooks/post-mergeNow, every time you pull updates, dependencies will automatically install.
Creating a New Branch
For your development work, create a new branch:
# Create and switch to a new branchgit checkout -b feature/your-feature-name# Or use the new syntaxgit switch -c feature/your-feature-nameWindows-Specific Considerations
Path Length Issues
Windows has a 260-character path limit that can cause problems with Node.js projects.
Solution 1: Enable long paths
# Run PowerShell as AdministratorNew-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Forcegit config --global core.longpaths trueSolution 2: Clone near drive root
# Clone to C:\projects\ instead of C:\Users\YourName\Documents\Projects\cd C:\mkdir projectscd projectsgit clone <repository-url>Line Ending Configuration
Ensure proper line ending handling:
git config --global core.autocrlf falsegit config --global core.eol lfAvoid OneDrive
Do not clone the repository into a OneDrive-synced folder. This can cause:
- File locking issues
- Node module installation problems
- Build failures
- Performance issues
Next: Environment Variables →