From 7a53f83f208fb75f35145d0617f18f04eb941983 Mon Sep 17 00:00:00 2001 From: Matt Cooper Date: Thu, 23 Mar 2023 10:07:00 -0400 Subject: [PATCH] Block ambiguous branch/tag names (#35670) Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> --- ...with-special-characters-in-branch-and-tag-names.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names.md b/content/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names.md index 44430df44033..e4805f523c33 100644 --- a/content/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names.md +++ b/content/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names.md @@ -47,3 +47,14 @@ If possible, create branch and tag names that don't contain special characters, * forward slash (`/`) To avoid confusion, you should start branch names with a letter. + +{% ifversion fpt or ghec or ghes > 3.8 %} + +## Restrictions on names in {% data variables.product.prodname_dotcom %} + +{% data variables.product.prodname_dotcom %} restricts a small number of branch and tag names from being pushed up. +Those restrictions are: +- No names which look like Git object IDs (40 characters containing only 0-9 and A-F), to prevent confusion with actual Git object IDs. +- No names beginning with `refs/`, to prevent confusion with the full name of Git refs. For more information about refs, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + +{% endif %}