summaryrefslogtreecommitdiff
path: root/Documentation/git-var.txt
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2021-11-03 20:17:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-03 20:25:36 (GMT)
commite06c9e1df28e04bbf013840c6c50ce1be41b9583 (patch)
tree0e2c67584cfba601c6d29a4c6981711dba173626 /Documentation/git-var.txt
parentaf6d1d602a8f64164b266364339c4e936d5bbc33 (diff)
downloadgit-e06c9e1df28e04bbf013840c6c50ce1be41b9583.zip
git-e06c9e1df28e04bbf013840c6c50ce1be41b9583.tar.gz
git-e06c9e1df28e04bbf013840c6c50ce1be41b9583.tar.bz2
var: add GIT_DEFAULT_BRANCH variable
Introduce the logical variable GIT_DEFAULT_BRANCH which represents the the default branch name that will be used by "git init". Currently this variable is equivalent to git config init.defaultbranch || 'master' This however will break if at one point the default branch is changed as indicated by `default_branch_name_advice` in `refs.c`. By providing this command ahead of time users of git can make their code forward-compatible. Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-var.txt')
-rw-r--r--Documentation/git-var.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index 6072f93..387cc1b 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -59,6 +59,9 @@ ifdef::git-default-pager[]
The build you are using chose '{git-default-pager}' as the default.
endif::git-default-pager[]
+GIT_DEFAULT_BRANCH::
+ The name of the first branch created in newly initialized repositories.
+
SEE ALSO
--------
linkgit:git-commit-tree[1]