mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
fix(server): Use 'main' as default branch for new git projects
Git initialization now explicitly specifies --initial-branch=main to match GitHub's default branch standard (since October 2020). This prevents the branch name mismatch that caused features to disappear from the UI when pushing to GitHub. Fixes #734 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,8 @@ describe('worktree create route - repositories without commits', () => {
|
||||
|
||||
async function initRepoWithoutCommit() {
|
||||
repoPath = await fs.mkdtemp(path.join(os.tmpdir(), 'automaker-no-commit-'));
|
||||
await execAsync('git init', { cwd: repoPath });
|
||||
// Initialize with 'main' as the default branch (matching GitHub's standard)
|
||||
await execAsync('git init --initial-branch=main', { cwd: repoPath });
|
||||
// Don't set git config - use environment variables in commit operations instead
|
||||
// to avoid affecting user's git config
|
||||
// Intentionally skip creating an initial commit
|
||||
|
||||
Reference in New Issue
Block a user