]> git.ipfire.org Git - thirdparty/git.git/commit
doc: git-push: create PUSH RULES section
authorJulia Evans <julia@jvns.ca>
Tue, 23 Sep 2025 18:10:48 +0000 (18:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Sep 2025 19:29:34 +0000 (12:29 -0700)
commitcc1cc31e2a46e33941840bbb2026fff2d0532b2b
tree69fd2bce9333cbbdb700d8acf0d8509a2bbd5915
parent92c87bdc406e5bcf1b516a861d609b03d99c23b7
doc: git-push: create PUSH RULES section

Right now the rules for when a `git push` is allowed are buried at the
bottom of the description of `<refspec>`. Put them in their own section
so that we can reference them from `--force` and give some context for
why they exist.

Having the "PUSH RULES" section also lets us be a little bit more
specific with the rule in `--force`: we can just focus on the rule
for pushing for a branch (which is likely the one that's most relevant)
and leave the details about what happens when you push to a tag or a ref
that isn't a branch to the later section.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-push.adoc