File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,16 +30,16 @@ Never use interactive commands like `git add -p`. Instead:
3030git diff > patch.diff
3131
3232# 2. Verify before applying (no file changes on failure)
33- git apply --check patch.diff
33+ git apply --cached -- check patch.diff
3434
35- # 3. Apply
36- git apply -v patch.diff
35+ # 3. Apply to staging area (equivalent to git add)
36+ git apply --cached patch.diff
3737```
3838
39- If ` git apply ` fails, try in order:
40- 1 . ` git apply --whitespace=fix patch.diff `
41- 2 . ` git apply --ignore-space-change patch.diff `
42- 3 . ` git apply --reject patch.diff ` → manually resolve ` .rej ` files
39+ If ` git apply --cached ` fails, try in order:
40+ 1 . ` git apply --cached -- whitespace=fix patch.diff `
41+ 2 . ` git apply --cached -- ignore-space-change patch.diff `
42+ 3 . Fall back to ` git add <files> ` for the specific files
4343
4444## Commit Message Format
4545Conventional Commits v1.0.0
Original file line number Diff line number Diff line change @@ -30,16 +30,16 @@ Never use interactive commands like `git add -p`. Instead:
3030git diff > patch.diff
3131
3232# 2. Verify before applying (no file changes on failure)
33- git apply --check patch.diff
33+ git apply --cached -- check patch.diff
3434
35- # 3. Apply
36- git apply -v patch.diff
35+ # 3. Apply to staging area (equivalent to git add)
36+ git apply --cached patch.diff
3737```
3838
39- If ` git apply ` fails, try in order:
40- 1 . ` git apply --whitespace=fix patch.diff `
41- 2 . ` git apply --ignore-space-change patch.diff `
42- 3 . ` git apply --reject patch.diff ` → manually resolve ` .rej ` files
39+ If ` git apply --cached ` fails, try in order:
40+ 1 . ` git apply --cached -- whitespace=fix patch.diff `
41+ 2 . ` git apply --cached -- ignore-space-change patch.diff `
42+ 3 . Fall back to ` git add <files> ` for the specific files
4343
4444## Commit Message Format
4545Conventional Commits v1.0.0
You can’t perform that action at this time.
0 commit comments