Skip to content

Commit ee9c8dd

Browse files
committed
Documentation: update add --force option + ignore=all config
- git-add.adoc: Update the --force documentation for submodule behaviour to be added even the given configuration ignore=all. - gitmodules.adoc and config/submodule.adoc: The submodule config ignore=all now need --force in order to update the index. Signed-off-by: Claus Schneider(Eficode) <claus.schneider@eficode.com>
1 parent 9219644 commit ee9c8dd

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Documentation/config/submodule.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ submodule.<name>.fetchRecurseSubmodules::
3232

3333
submodule.<name>.ignore::
3434
Defines under what circumstances "git status" and the diff family show
35-
a submodule as modified. When set to "all", it will never be considered
36-
modified (but it will nonetheless show up in the output of status and
37-
commit when it has been staged), "dirty" will ignore all changes
38-
to the submodule's work tree and
35+
a submodule as modified.
36+
Set to "all" will never considered the submodule modified. It can
37+
nevertheless be staged using the option --force and it will then show up
38+
in the output of status.
39+
Set to "dirty" will ignore all changes to the submodule's work tree and
3940
takes only differences between the HEAD of the submodule and the commit
4041
recorded in the superproject into account. "untracked" will additionally
4142
let submodules with modified tracked files in their work tree show up.
42-
Using "none" (the default when this option is not set) also shows
43-
submodules that have untracked files in their work tree as changed.
43+
Set to "none"(default) It is also shows submodules that have untracked
44+
files in their work tree as changed.
4445
This setting overrides any setting made in .gitmodules for this submodule,
4546
both settings can be overridden on the command line by using the
4647
"--ignore-submodules" option. The 'git submodule' commands are not

Documentation/git-add.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ in linkgit:gitglossary[7].
7777

7878
`-f`::
7979
`--force`::
80-
Allow adding otherwise ignored files.
80+
Allow adding otherwise ignored files. The option is also used when
81+
`submodule.<name>.ignore=all` is set, but you want to stage an
82+
update of the submodule. The `path` to the submodule must be explicitly
83+
specified.
8184

8285
`--sparse`::
8386
Allow updating index entries outside of the sparse-checkout cone.

Documentation/gitmodules.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ submodule.<name>.ignore::
7070
--
7171
all;; The submodule will never be considered modified (but will
7272
nonetheless show up in the output of status and commit when it has
73-
been staged).
73+
been staged). Add `(new commits)` can be overruled using the
74+
`git add --force <submodule.path>`.
75+
The setting affects `status`, `update-index`, `diff` and `log`(due
76+
to underlaying `diff`).
7477

7578
dirty;; All changes to the submodule's work tree will be ignored, only
7679
committed differences between the `HEAD` of the submodule and its

0 commit comments

Comments
 (0)