dotly icon indicating copy to clipboard operation
dotly copied to clipboard

Specify git init main branch

Open SultanICQ opened this issue 2 years ago • 1 comments

When the installer execute the git init, it is not specifying the name of the branch.

In my case my default branch is still "master" so when I follow the git remote steps it fails because the documentation talks about "main" branch and my branch name is "master".

I think this line:

git init 2>&1 | _log "Initializing repository"

should be:

git init --initial-branch="$DOTLY_BRANCH" 2>&1 | _log "Initializing repository"

SultanICQ avatar Jul 04 '23 10:07 SultanICQ

By default git init is using main currently and you propose to create a custom branch. But the installer is for brand new dotfiles which means that your dotfiles does not exists before.

DOTLY_BRANCH exists as env and it is for Dotly submodule not is intendeed for that use case, if you want to modify this behaviour and send a PR that var should have a different name like, as example, DOTFILES_BRANCH.

gtrabanco avatar Jul 04 '23 10:07 gtrabanco