From aa0516b8632677cb4f747f2995b6513a7d46dc7c Mon Sep 17 00:00:00 2001 From: lolbinarycat Date: Tue, 10 Jun 2025 12:48:05 -0500 Subject: [PATCH] =?UTF-8?q?Using=20git=20=C2=A7=20I=20changed=20a=20submod?= =?UTF-8?q?ule=20by=20accident:=20be=20explicit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewriting git history is something that is often difficult for new contributors, and we're already explaining the `` placeholder syntax, so I think it makes sense to be explicit about what exactly the paths mean. --- src/git.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git.md b/src/git.md index 8118ddff1..8726ddfce 100644 --- a/src/git.md +++ b/src/git.md @@ -142,7 +142,8 @@ The most common cause is that you rebased after a change and ran `git add .` wit `x` to update the submodules. Alternatively, you might have run `cargo fmt` instead of `x fmt` and modified files in a submodule, then committed the changes. -To fix it, do the following things: +To fix it, do the following things (if you changed a submodule other than cargo, +replace `src/tools/cargo` with the path to that submodule): 1. See which commit has the accidental changes: `git log --stat -n1 src/tools/cargo` 2. Revert the changes to that commit: `git checkout ~ src/tools/cargo`. Type `~`