You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/FAQ.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ limitations under the License.
37
37
-[When should I use decimals in examples, benchmarks, and documentation, and when should I avoid them?](#decimal-usage)
38
38
-[How should I name my pull request?](#pr-naming)
39
39
-[How do I call the stdlib bot on my PR?](#stdlib-bot)
40
+
-[Why were many unrelated files automatically pushed to my PR when I committed my changes?](#auto-push)
40
41
-[Frequently used `make` commands](#freq-make-commands)
41
42
-[Other Links](#other-links)
42
43
@@ -290,6 +291,32 @@ Once you have created your PR, you can call the **stdlib-bot** to perform basic
290
291
291
292
To see other available bot commands, comment `/stdlib help` on your PR.
292
293
294
+
<aname="auto-push"></a>
295
+
296
+
## Why were many unrelated files automatically pushed to my PR when I committed my changes?
297
+
298
+
When you open a pull request or push changes to your feature branch, GitHub compares your feature branch against your `develop` branch and shows all the differences. If your feature branch contains outdated or extra changes, they will appear in the PR, even if they are unrelated to your work.
299
+
300
+
To fix this, ensure that your feature branch is based on the latest `develop` branch. You can do this by updating your local `develop` branch and then merging it into your feature branch:
301
+
302
+
```bash
303
+
$ git checkout develop
304
+
$ git pull upstream develop
305
+
$ git push origin develop
306
+
$ git checkout feature-branch
307
+
$ git merge develop
308
+
```
309
+
310
+
After merging, push your changes to the remote repository:
311
+
312
+
```bash
313
+
$ git push origin feature-branch # git push also works
314
+
```
315
+
316
+
> **Note**: When developing stdlib, we recommend using `merge` instead of `rebase` once a PR is open. Rebasing rewrites your branch history, which usually requires a force-push to update the remote branch. This can disrupt other contributors who are reviewing or collaborating on your PR. Since stdlib uses squash and merge for PRs, we don't require a clean, linear commit history. Merge commits are acceptable as long as your diff only contains relevant changes. If you want to learn more about rebasing/merging, you can refer to our [Git guide][git-guide].
317
+
318
+
Alternatively, you can call the **stdlib-bot** to merge changes from the `develop` branch into your PR. To do this, comment `/stdlib merge` on your PR.
319
+
293
320
<aname="freq-make-commands"></a>
294
321
295
322
## Frequently used `make` commands
@@ -355,6 +382,7 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
355
382
## Other Links:
356
383
357
384
-[Style Guide][style-guide]
385
+
-[Git Cheatsheet][git-guide]
358
386
-[Other make commands][make-commands]
359
387
360
388
<sectionclass="links">
@@ -367,6 +395,8 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
0 commit comments