<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-init.txt, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-12-13T23:53:50Z</updated>
<entry>
<title>init: document `init.defaultBranch` better</title>
<updated>2020-12-13T23:53:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-12-11T11:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1296cbe4b4675f429eb20b85bb86ec61546103fb'/>
<id>urn:sha1:1296cbe4b4675f429eb20b85bb86ec61546103fb</id>
<content type='text'>
Our documentation does not mention any future plan to change 'master' to
other value. It is a good idea to document this, though.

Initial-patch-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: fix the bnf like style of some commands</title>
<updated>2020-10-08T21:01:19Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2020-10-08T20:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f443f553171032d5ce004ae326ecb116a6ef4e5'/>
<id>urn:sha1:9f443f553171032d5ce004ae326ecb116a6ef4e5</id>
<content type='text'>
In command line options, variables are entered between &lt; and &gt;

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: mark `--object-format=sha256` as experimental</title>
<updated>2020-08-17T17:50:14Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-08-16T10:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff233d8dda12657a90d378f2b403bc6c85838c59'/>
<id>urn:sha1:ff233d8dda12657a90d378f2b403bc6c85838c59</id>
<content type='text'>
After eff45daab8 ("repository: enable SHA-256 support by default",
2020-07-29), vanilla builds of Git enable the user to run, e.g.,

  git init --object-format=sha256

and hack away. This can be a good way to gain experience with the
SHA-256 world, e.g., to find bugs that

  GIT_TEST_DEFAULT_HASH=sha256 make test

doesn't spot.

But it really is a separate world: Such SHA-256 repos will live entirely
separate from the (by now fairly large) set of SHA-1 repos. Interacting
across the border is possible in principle, e.g., through "diff + apply"
(or "format-patch + am"), but even that has its limitations: Applying a
SHA-256 diff in a SHA-1 repo works in the simple case, but if you need
to resort to `-3`, you're out of luck.

Similarly, "push + pull" should work, but you really will be operating
mostly offset from the rest of the world. That might be ok by the time
you initialize your repository, and it might be ok for several months
after that, but there might come a day when you're starting to regret
your use of `git init --object-format=sha256` and have dug yourself into
a fairly deep hole.

There are currently topics in flight to document our data formats and
protocols regarding SHA-256 and in some cases (midx and commit-graph),
we're considering adjusting how the file formats indicate which object
format to use.

Wherever `--object-format` is mentioned in our documentation, let's make
it clear that using it with "sha256" is experimental. If we later need
to explain why we can't handle data we generated back in 2020, we can
always point to this paragraph we're adding here.

By "include::"-ing a small blurb, we should be able to be consistent
throughout the documentation and can eventually gradually tone down the
severity of this text. One day, we might even use it to start phasing
out `--object-format=sha1`, but let's not get ahead of ourselves...

There's also `extensions.objectFormat`, but it's only mentioned three
times. Twice where we're adding this new disclaimer and in the third
spot we already have a "do not edit" warning. From there, interested
readers should eventually find this new one that we're adding here.

Because `GIT_DEFAULT_HASH` provides another entry point to this
functionality, document the experimental nature of it too.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>init: allow specifying the initial branch name for the new repository</title>
<updated>2020-06-24T16:14:21Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-06-24T14:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=32ba12dab2acf1ad11836a627956d1473f6b851a'/>
<id>urn:sha1:32ba12dab2acf1ad11836a627956d1473f6b851a</id>
<content type='text'>
There is a growing number of projects and companies desiring to change
the main branch name of their repositories (see e.g.
https://twitter.com/mislav/status/1270388510684598272 for background on
this).

To change that branch name for new repositories, currently the only way
to do that automatically is by copying all of Git's template directory,
then hard-coding the desired default branch name into the `.git/HEAD`
file, and then configuring `init.templateDir` to point to those copied
template files.

To make this process much less cumbersome, let's introduce a new option:
`--initial-branch=&lt;branch-name&gt;`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: add missing diamond brackets</title>
<updated>2020-06-24T16:14:21Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-06-24T14:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6069eccdc9d6351f1668b85551bbee4b6ca7cbb0'/>
<id>urn:sha1:6069eccdc9d6351f1668b85551bbee4b6ca7cbb0</id>
<content type='text'>
There were a couple of instances in our manual pages that had an
opening diamond bracket without a corresponding closing one.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/init-db: allow specifying hash algorithm on command line</title>
<updated>2020-02-24T17:33:27Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-02-22T20:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b8f7189dff1f9ee2e3d65dfaafc2fc9f4956232'/>
<id>urn:sha1:8b8f7189dff1f9ee2e3d65dfaafc2fc9f4956232</id>
<content type='text'>
Allow the user to specify the hash algorithm on the command line by
using the --object-format option to git init.  Validate that the user is
not attempting to reinitialize a repository with a different hash
algorithm.  Ensure that if we are writing a non-SHA-1 repository that we
set the repository version to 1 and write the objectFormat extension.

Restrict this option to work only when ENABLE_SHA256 is set until the
codebase is in a situation to fully support this.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'km/init-doc-typofix'</title>
<updated>2019-02-07T06:05:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-07T06:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3d41733f9dd0d638d1538b54d516fed033c165b'/>
<id>urn:sha1:a3d41733f9dd0d638d1538b54d516fed033c165b</id>
<content type='text'>
Docfix.

* km/init-doc-typofix:
  init docs: correct a punctuation typo
</content>
</entry>
<entry>
<title>init docs: correct a punctuation typo</title>
<updated>2019-01-31T17:47:20Z</updated>
<author>
<name>Kyle Meyer</name>
<email>kyle@kyleam.com</email>
</author>
<published>2019-01-24T21:44:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86fb1c4e770e201b136a81cc3f4a3b2e592961c2'/>
<id>urn:sha1:86fb1c4e770e201b136a81cc3f4a3b2e592961c2</id>
<content type='text'>
Signed-off-by: Kyle Meyer &lt;kyle@kyleam.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: do not nest open blocks</title>
<updated>2018-12-26T23:29:30Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-12-16T14:28:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad1f243ad9e8740093abbcd93a3b0683dcd15107'/>
<id>urn:sha1:ad1f243ad9e8740093abbcd93a3b0683dcd15107</id>
<content type='text'>
It appears we try to nest open blocks, but that does not work well with
Asciidoctor, which fails to indent the inner blocks. As a result, they
do not visually seem to relate (as much) to the preceding paragraph as
they should. Drop the outer blocks to fix the rendering of the inner
ones. Asciidoc renders identically before and after this patch, both
man-pages and html.

This also makes Asciidoctor stop rendering a literal '+' before "Under
--pretty=oneline ..." in the manuals for git-log and git-rev-list.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>init: document dotfiles exclusion on template copy</title>
<updated>2017-02-17T23:57:21Z</updated>
<author>
<name>Grégoire Paris</name>
<email>gregoire.paris.greg0ire@gmail.com</email>
</author>
<published>2017-02-17T23:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=133f0a299da937d0a77a19a274c7730b2af5bf9c'/>
<id>urn:sha1:133f0a299da937d0a77a19a274c7730b2af5bf9c</id>
<content type='text'>
Not just . and .., but any path that begins with dot is not copied
when copying the template directory to a new repository.  You can
customize the template directory, copying some dotfiles might make
sense, but it's actually a good thing not to, because you would not
want to have your git directory copied in every git directory that
is created should you decide to put your template directory under
version control, for example.  Plus, it might be used as a feature
by people who would want to exclude some files.

Signed-off-by: Grégoire Paris &lt;postmaster@greg0ire.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
