Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set 'init.defaultBranch' in ci:setup to suppress 'git init' warning (#…
…172) In Git 2.30+, the `git init` command outputs a warning if `init.defaultBranch` is not set in the Git configuration: git/git@675704c Setting this default in `ci:setup` ensures that the warning does not spam CI logs every time `git init` is run. This config change only affects new repos created by `git init`, not repositories cloned using `git clone`. Hatchet uses `git init` when the path passed to `App.new` is a local directory, and not a repository cloned via `hatchet.lock`. This changes the default branch for new repos from `master` to `main`, however this works without further changes, since Hatchet already uses `git push HEAD:main`, where `HEAD` will reference the current branch regardless of its choice of name. This change is also compatible with older versions of Git, since they ignore unknown config file entries. Fixes #165. Co-authored-by: Richard Schneeman <[email protected]>
- Loading branch information