1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #4036 from kazuhitoyokoi/master-usemain

Use main branch as default in project feature
This commit is contained in:
Nick O'Leary 2023-02-02 10:20:24 +00:00 committed by GitHub
commit 149e8ce9b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,7 +421,10 @@ module.exports = {
});
},
initRepo: function(cwd) {
return runGitCommand(["init"],cwd);
var args = ["init", "--initial-branch", "main"];
return runGitCommand(args, cwd).catch(function () {
return runGitCommand(["init"], cwd);
});
},
setUpstream: function(cwd,remoteBranch) {
var args = ["branch","--set-upstream-to",remoteBranch];