Description
Description
During the Frappe cloud deployment process, Git displays a warning message about using 'master' as the initial branch name, even when users have configured their global Git settings to use 'main' as the default branch (git config --global init.defaultBranch main
).
This occurs during the automated deployment process when cloning with a specific commit hash:
Technical Details
The warning appears because the deployment script performs a clone operation with a specific commit hash, which creates a temporary branch using Git's built-in defaults rather than respecting the user's global settings.
Current output includes:
- Creation of empty repo
- Creation of temporary 'master' branch (triggering warning)
- Switch to 'main' branch
- Checkout of specific commit (detached HEAD state)
Impact
While this doesn't affect deployment functionality, it creates unnecessary warning messages in logs and could cause confusion for users who have explicitly set their default branch to 'main'.
Suggested Solutions
- Modify the clone command to explicitly specify the branch name using
-b main
- Or restructure the deployment process to:
- First clone the repository normally
- Then checkout the specific commit hash
Environment
- Platform: Frappe Cloud
- Operation: Automated deployment process
Activity