<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-push.txt, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-11-14T06:27:56Z</updated>
<entry>
<title>push doc: document the DWYM behavior pushing to unqualified &lt;dst&gt;</title>
<updated>2018-11-14T06:27:56Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-11-13T19:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2219c09e23c39aed7c869c1f4dda28aec46da984'/>
<id>urn:sha1:2219c09e23c39aed7c869c1f4dda28aec46da984</id>
<content type='text'>
Document the DWYM behavior that kicks in when pushing to an
unqualified &lt;dst&gt; reference.

This behavior was added in f88395ac23 ("Renaming push.", 2005-08-03)
and f8aae12034 ("push: allow unqualified dest refspecs to DWIM",
2008-04-23), and somewhat documented in bb9fca80ce ("git-push: Update
description of refspecs and add examples", 2007-06-09), but has never
been fully documented.

The closest we got to having documented it was the description in the
commit message for f8aae12034, which I've borrowed from in writing
this documentation.

Let's also refer to this new documentation from the existing
documentation we had (added in bb9fca80ce).

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push doc: add spacing between two words</title>
<updated>2018-09-19T19:43:50Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-09-18T05:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4ec16ad0c588ccdf10fbb9edb862dcb32b90c9b'/>
<id>urn:sha1:f4ec16ad0c588ccdf10fbb9edb862dcb32b90c9b</id>
<content type='text'>
Fix a formatting error introduced in my recently landed
fe802bd21e ("push doc: correct lies about how push refspecs work",
2018-08-31).

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push doc: correct lies about how push refspecs work</title>
<updated>2018-08-31T21:04:06Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-08-31T20:10:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe802bd21e81cceedff2db79cc3c9a5ad75b4f93'/>
<id>urn:sha1:fe802bd21e81cceedff2db79cc3c9a5ad75b4f93</id>
<content type='text'>
There's complex rules governing whether a push is allowed to take
place depending on whether we're pushing to refs/heads/*, refs/tags/*
or refs/not-that/*. See is_branch() in refs.c, and the various
assertions in refs/files-backend.c. (e.g. "trying to write non-commit
object %s to branch '%s'").

This documentation has never been quite correct, but went downhill
after dbfeddb12e ("push: require force for refs under refs/tags/",
2012-11-29) when we started claiming that &lt;dst&gt; couldn't be a tag
object, which is incorrect. After some of the logic in that patch was
changed in 256b9d70a4 ("push: fix "refs/tags/ hierarchy cannot be
updated without --force"", 2013-01-16) the docs weren't updated, and
we've had some version of documentation that confused whether &lt;src&gt;
was a tag or not with whether &lt;dst&gt; would accept either an annotated
tag object or the commit it points to.

This makes the intro somewhat more verbose &amp; complex, perhaps we
should have a shorter description here and split the full complexity
into a dedicated section. Very few users will find themselves needing
to e.g. push blobs or trees to refs/custom-namespace/* (or blobs or
trees at all), and that could be covered separately as an advanced
topic.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push doc: move mention of "tag &lt;tag&gt;" later in the prose</title>
<updated>2018-08-31T21:04:06Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-08-31T20:10:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8da6128c264c7896c011b5e3e0eace57eb073f63'/>
<id>urn:sha1:8da6128c264c7896c011b5e3e0eace57eb073f63</id>
<content type='text'>
This change will be followed-up with a subsequent change where I'll
change both sides of this mention of "tag &lt;tag&gt;" to be something
that's best read without interruption.

To make that change smaller, let's move this mention of "tag &lt;tag&gt;" to
the end of the "&lt;refspec&gt;..." section, it's now somewhere in the
middle.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push doc: remove confusing mention of remote merger</title>
<updated>2018-08-31T21:04:06Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-08-31T20:10:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d931455acf1cf1a21a4f10fd99fc2bd9bbefa7a9'/>
<id>urn:sha1:d931455acf1cf1a21a4f10fd99fc2bd9bbefa7a9</id>
<content type='text'>
Saying that "git push &lt;remote&gt; &lt;src&gt;:&lt;dst&gt;" won't push a merger of
&lt;src&gt; and &lt;dst&gt; to &lt;dst&gt; is clear from the rest of the context here,
so mentioning it is redundant, furthermore the mention of "EXAMPLES
below" isn't specific or useful.

This phrase was originally added in 149f6ddfb3 ("Docs: Expand
explanation of the use of + in git push refspecs.", 2009-02-19), as
can be seen in that change the point of the example being cited was to
show that force pushing can leave unreferenced commits on the
remote. It's enough that we explain that in its own section, it
doesn't need to be mentioned here.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ah/misc-doc-updates'</title>
<updated>2018-05-23T05:38:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be75d12982e614685f47bff67676eb69c60bf624'/>
<id>urn:sha1:be75d12982e614685f47bff67676eb69c60bf624</id>
<content type='text'>
Misc doc fixes.

* ah/misc-doc-updates:
  doc: normalize [--options] to [options] in git-diff
  doc: add note about shell quoting to revision.txt
  git-svn: remove ''--add-author-from' for 'commit-diff'
  doc: add '-d' and '-o' for 'git push'
  doc: clarify ignore rules for git ls-files
  doc: align 'diff --no-index' in text and synopsis
  doc: improve formatting in githooks.txt
</content>
</entry>
<entry>
<title>Merge branch 'nd/doc-header'</title>
<updated>2018-05-23T05:38:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b0f1d9c475038a54343c007193f1c81ae82b959'/>
<id>urn:sha1:6b0f1d9c475038a54343c007193f1c81ae82b959</id>
<content type='text'>
Doc formatting fix.

* nd/doc-header:
  doc: keep first level section header in upper case
</content>
</entry>
<entry>
<title>doc: add '-d' and '-o' for 'git push'</title>
<updated>2018-05-06T09:38:43Z</updated>
<author>
<name>Andreas Heiduk</name>
<email>asheiduk@gmail.com</email>
</author>
<published>2018-05-03T18:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=97c5d246ec90122b177fbeaa43b74b64a39413d9'/>
<id>urn:sha1:97c5d246ec90122b177fbeaa43b74b64a39413d9</id>
<content type='text'>
Add the missing `-o` shortcut for `--push-option` to the synopsis.
Add the missing `-d` shortcut for `--delete` in the main section.

Signed-off-by: Andreas Heiduk &lt;asheiduk@gmail.com&gt;
Reviewed-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: keep first level section header in upper case</title>
<updated>2018-05-02T08:03:33Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-04-30T15:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76a8788c141e9d4e2713acaa7886475fb6b27ca5'/>
<id>urn:sha1:76a8788c141e9d4e2713acaa7886475fb6b27ca5</id>
<content type='text'>
When formatted as a man page, 1st section header is always in upper
case even if we write it otherwise. Make all 1st section headers
uppercase to keep it close to the final output.

This does affect html since case is kept there, but I still think it's
a good idea to maintain a consistent style for 1st section headers.

Some sections perhaps should become second sections instead, where
case is kept, and for better organization. I will update if anyone has
suggestions about this.

While at there I also make some header more consistent (e.g. examples
vs example) and fix a couple minor things here and there.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: convert \--option to --option</title>
<updated>2018-04-18T03:49:26Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-04-17T19:15:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e9f132f53dfe7dbb2a33aac0917144ccb9e2c9b'/>
<id>urn:sha1:9e9f132f53dfe7dbb2a33aac0917144ccb9e2c9b</id>
<content type='text'>
Rather than using a backslash in \--foo, with or without ''-quoting,
write `--foo` for better rendering. As explained in commit 1c262bb7b
(doc: convert \--option to --option, 2015-05-13), the backslash is not
needed for the versions of AsciiDoc that we support, but is rendered
literally by Asciidoctor.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
</content>
</entry>
</feed>
