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

Use main branch as default in project feature

This commit is contained in:
Kazuhito Yokoi 2023-01-31 00:36:18 +09:00
parent 7dca148349
commit 5bda221f9d

View File

@ -421,7 +421,10 @@ module.exports = {
}); });
}, },
initRepo: function(cwd) { 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) { setUpstream: function(cwd,remoteBranch) {
var args = ["branch","--set-upstream-to",remoteBranch]; var args = ["branch","--set-upstream-to",remoteBranch];