Skip to content

Commit 3b85898

Browse files
authored
Turn off git's message about default branch name in deploydocs.jl (#2854)
1 parent 5ad1c98 commit 3b85898

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
* Added `Remotes.Forgejo` for specifying a `Remote` hosted on a Forgejo instance (such as codeberg.org). ([#2857])
1111

12+
### Changed
13+
14+
* Git no longer displays a message about the default branch name when calling `deploydocs()`. ([#2854])
15+
1216
## Version [v1.16.1] - 2025-11-21
1317

1418
### Fixed

src/deploydocs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ function git_push(
379379
# Generate a closure with common commands for ssh and https
380380
function git_commands(sshconfig = nothing)
381381
# Setup git.
382-
run(`$(git()) init`)
382+
run(`$(git()) init --initial-branch=main`) # specify initial branch just to turn off the advice in the deploy logs
383383
run(`$(git()) config user.name "Documenter.jl"`)
384384
run(`$(git()) config user.email "documenter@juliadocs.github.io"`)
385385
run(`$(git()) config commit.gpgsign false`)

0 commit comments

Comments
 (0)