<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-add.txt, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-02T08:03:33Z</updated>
<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>add: introduce "--renormalize"</title>
<updated>2017-11-17T01:31:05Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2017-11-16T16:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9472935d81eaf9faed771878c9df0216ae0d9045'/>
<id>urn:sha1:9472935d81eaf9faed771878c9df0216ae0d9045</id>
<content type='text'>
Make it safer to normalize the line endings in a repository.
Files that had been commited with CRLF will be commited with LF.

The old way to normalize a repo was like this:

 # Make sure that there are not untracked files
 $ echo "* text=auto" &gt;.gitattributes
 $ git read-tree --empty
 $ git add .
 $ git commit -m "Introduce end-of-line normalization"

The user must make sure that there are no untracked files,
otherwise they would have been added and tracked from now on.

The new "add --renormalize" does not add untracked files:

 $ echo "* text=auto" &gt;.gitattributes
 $ git add --renormalize .
 $ git commit -m "Introduce end-of-line normalization"

Note that "git add --renormalize &lt;pathspec&gt;" is the short form for
"git add -u --renormalize &lt;pathspec&gt;".

While at it, document that the same renormalization may be needed,
whenever a clean filter is added or changed.

Helped-By: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mr/doc-negative-pathspec'</title>
<updated>2017-10-03T06:42:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-10-03T06:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9124cca61f7edfed70dc5d8bced7fb7cb9fe2221'/>
<id>urn:sha1:9124cca61f7edfed70dc5d8bced7fb7cb9fe2221</id>
<content type='text'>
Doc updates.

* mr/doc-negative-pathspec:
  docs: improve discoverability of exclude pathspec
</content>
</entry>
<entry>
<title>docs: improve discoverability of exclude pathspec</title>
<updated>2017-09-25T08:54:36Z</updated>
<author>
<name>Manav Rathi</name>
<email>mnvrth@gmail.com</email>
</author>
<published>2017-09-25T08:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93dbefb389a011c9107a3908fd38e743055be267'/>
<id>urn:sha1:93dbefb389a011c9107a3908fd38e743055be267</id>
<content type='text'>
The ability to exclude paths with a negative pathspec is not mentioned
in the man pages for git grep and other commands where it might be
useful.

Add an example and a pointer to the pathspec glossary entry in the man
page for git grep to help the user to discover this ability.

Add similar pointers from the git-add and git-status man pages.

Additionally,

- Add a test for the behaviour when multiple exclusions are present.
- Add a test for the ^ alias.
- Improve name of existing test.
- Improve grammar in glossary description of the exclude pathspec.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Manav Rathi &lt;mnvrth@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: warn when adding an embedded repository</title>
<updated>2017-06-15T16:10:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-06-14T10:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=532139940c98a98bce2001bb495d75dec3d88e4d'/>
<id>urn:sha1:532139940c98a98bce2001bb495d75dec3d88e4d</id>
<content type='text'>
It's an easy mistake to add a repository inside another
repository, like:

  git clone $url
  git add .

The resulting entry is a gitlink, but there's no matching
.gitmodules entry. Trying to use "submodule init" (or clone
with --recursive) doesn't do anything useful. Prior to
v2.13, such an entry caused git-submodule to barf entirely.
In v2.13, the entry is considered "inactive" and quietly
ignored. Either way, no clone of your repository can do
anything useful with the gitlink without the user manually
adding the submodule config.

In most cases, the user probably meant to either add a real
submodule, or they forgot to put the embedded repository in
their .gitignore file.

Let's issue a warning when we see this case. There are a few
things to note:

  - the warning will go in the git-add porcelain; anybody
    wanting to do low-level manipulation of the index is
    welcome to create whatever funny states they want.

  - we detect the case by looking for a newly added gitlink;
    updates via "git add submodule" are perfectly reasonable,
    and this avoids us having to investigate .gitmodules
    entirely

  - there's a command-line option to suppress the warning.
    This is needed for git-submodule itself (which adds the
    entry before adding any submodule config), but also
    provides a mechanism for other scripts doing
    submodule-like things.

We could make this a hard error instead of a warning.
However, we do add lots of sub-repos in our test suite. It's
not _wrong_ to do so. It just creates a state where users
may be surprised. Pointing them in the right direction with
a gentle hint is probably the best option.

There is a config knob that can disable the (long) hint. But
I intentionally omitted a config knob to disable the warning
entirely. Whether the warning is sensible or not is
generally about context, not about the user's preferences.
If there's a tool or workflow that adds gitlinks without
matching .gitmodules, it should probably be taught about the
new command-line option, rather than blanket-disabling the
warning.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: document the chmod option</title>
<updated>2016-09-12T22:03:32Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2016-09-12T21:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ef7903e60671bc8b13186c5ffd49c6c54435b75'/>
<id>urn:sha1:7ef7903e60671bc8b13186c5ffd49c6c54435b75</id>
<content type='text'>
The git add --chmod option was introduced in 4e55ed3 ("add: add
--chmod=+x / --chmod=-x options", 2016-05-31), but was never
documented.  Document the feature.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-add doc: do not say working directory when you mean working tree</title>
<updated>2016-01-21T17:06:35Z</updated>
<author>
<name>Lars Vogel</name>
<email>lars.vogel@gmail.com</email>
</author>
<published>2016-01-21T10:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd02e97f68b672598c52a39cb8eba508ef7c53bf'/>
<id>urn:sha1:bd02e97f68b672598c52a39cb8eba508ef7c53bf</id>
<content type='text'>
The usage of working directory is inconsistent in the git add help.
Also http://git-scm.com/docs/git-clone speaks only about working tree.
Remaining entry found by "git grep -B1 '^directory' git-add.txt" really
relates to a directory.

Signed-off-by: Lars Vogel &lt;Lars.Vogel@vogella.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/asciidoc-markup-fix'</title>
<updated>2015-05-22T19:41:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-22T19:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1caa5895458443cc9535b6fda6ff8480383471b'/>
<id>urn:sha1:d1caa5895458443cc9535b6fda6ff8480383471b</id>
<content type='text'>
Various documentation mark-up fixes to make the output more
consistent in general and also make AsciiDoctor (an alternative
formatter) happier.

* jk/asciidoc-markup-fix:
  doc: convert AsciiDoc {?foo} to ifdef::foo[]
  doc: put example URLs and emails inside literal backticks
  doc: drop backslash quoting of some curly braces
  doc: convert \--option to --option
  doc/add: reformat `--edit` option
  doc: fix length of underlined section-title
  doc: fix hanging "+"-continuation
  doc: fix unquoted use of "{type}"
  doc: fix misrendering due to `single quote'
</content>
</entry>
<entry>
<title>doc/add: reformat `--edit` option</title>
<updated>2015-05-13T05:13:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-13T04:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a3ca9c011c274f4e38a6a4508f5a370b32a0745'/>
<id>urn:sha1:0a3ca9c011c274f4e38a6a4508f5a370b32a0745</id>
<content type='text'>
All of the other options in the list put short and long as
two separate headings.

We can also drop the backslashing of `--`. It isn't used
elsewhere and is unnecessary for modern asciidoc (plus it
confuses asciidoctor).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*config.txt: stick to camelCase naming convention</title>
<updated>2015-03-14T05:13:46Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-03-11T20:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da0005b8853137c91e44867d899910d5c7eb4425'/>
<id>urn:sha1:da0005b8853137c91e44867d899910d5c7eb4425</id>
<content type='text'>
This should improve readability. Compare "thislongname" and
"thisLongName". The following keys are left in unchanged. We can
decide what to do with them later.

 - am.keepcr
 - core.autocrlf .safecrlf .trustctime
 - diff.dirstat .noprefix
 - gitcvs.usecrlfattr
 - gui.blamehistoryctx .trustmtime
 - pull.twohead
 - receive.autogc
 - sendemail.signedoffbycc .smtpsslcertpath .suppresscc

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
