Skip to content

Commit 0f5f25e

Browse files
committed
Manual word-smithing
1 parent 31915ee commit 0f5f25e

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ working build therefore needs all of the following:
8181

8282
### Recommended clone
8383

84-
The default `git clone` plus the submodules gives you everything you need:
84+
Clone the repository with its submodules:
8585

8686
```console
8787
$ git clone --recurse-submodules https://github.com/NVIDIA/cuda-python.git
@@ -94,6 +94,13 @@ To keep initialized submodules in sync on `git pull`, `git checkout`, and
9494
$ git config --local submodule.recurse true
9595
```
9696

97+
This setting can also make `git push` recurse into submodules. To keep
98+
`git push` limited to this repository, also set this once per clone:
99+
100+
```console
101+
$ git config --local push.recurseSubmodules no
102+
```
103+
97104
### Fixing an existing clone
98105

99106
If you already have a shallow clone:
@@ -122,11 +129,15 @@ drift.
122129

123130
### Updating your clone
124131

125-
If you did not set `git config --local submodule.recurse true`, use
126-
`git pull --recurse-submodules` to update initialized submodules to the commits
127-
recorded by the repository.
128-
Newly added submodules still need initialization; see
129-
[Fixing an existing clone](#fixing-an-existing-clone).
132+
To update your clone and initialize any newly added submodules, run:
133+
134+
```console
135+
$ git pull --recurse-submodules && git submodule update --init
136+
```
137+
138+
You can omit `--recurse-submodules` if you have already run
139+
`git config --local submodule.recurse true`. The second command is usually a
140+
no-op, but ensures that newly added submodules are initialized.
130141

131142
### Symptoms of a bad clone
132143

0 commit comments

Comments
 (0)