Skip to content

Commit 62ea82b

Browse files
lanceMylesBorins
authored andcommitted
doc: add 'git clean -xfd' to backport guide
When changing from a recent version, e.g. 8.x to an older branch like 6.x test artifacts sometimes hang around and cause failures. Using `git clean` will prevent that from happening. PR-URL: #15715 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 6d41c85 commit 62ea82b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/guides/backporting-to-release-lines.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ cd $NODE_DIR
4444
git fetch upstream v6.x-staging:v6.x-staging -f
4545
# Assume we want to backport PR #10157
4646
git checkout -b backport-10157-to-v6.x v6.x-staging
47+
# Ensure there are no test artifacts from previous builds
48+
# Note that this command deletes all files and directories
49+
# not under revision control below the ./test directory.
50+
# It is optional and should be used with caution.
51+
git clean -xfd ./test/
4752
```
4853

4954
4. After creating the branch, apply the changes to the branch. The cherry-pick

0 commit comments

Comments
 (0)