Skip to content

Reinitializes repository during initialise#27

Merged
aboo merged 1 commit into
mainfrom
feature/pap-7040-fix-unable-to-push
Apr 21, 2026
Merged

Reinitializes repository during initialise#27
aboo merged 1 commit into
mainfrom
feature/pap-7040-fix-unable-to-push

Conversation

@aboo
Copy link
Copy Markdown
Contributor

@aboo aboo commented Apr 21, 2026

What does this PR do?

The initialise command in the workbench CLI now thoroughly cleans up and reinitializes the Git repository. It first removes CLI-specific files and then completely resets the Git history by removing the .git directory, running git init, adding all current files, and creating an initial "Source Import" commit. This ensures a clean and independent repository for the new project, preventing potential issues when pushing to a new remote that might arise from inheriting the template's Git history.

Relates to PAP-7040

- Avoid push failures caused by stale or inherited git remotes
- Remove CLI-only files from imported source repositories
- Recreate git metadata, commit a clean "Source Import", and verify
  the worktree is clean before finishing initialise

Delivers PAP-7040
@aboo aboo merged commit 4e4d47d into main Apr 21, 2026
1 check passed
@aboo aboo deleted the feature/pap-7040-fix-unable-to-push branch April 21, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant