diff --git a/cli/src/commands/edit.rs b/cli/src/commands/edit.rs index 56df375fe98..cad6f81cbcb 100644 --- a/cli/src/commands/edit.rs +++ b/cli/src/commands/edit.rs @@ -25,6 +25,8 @@ use crate::ui::Ui; /// /// Note, it is generally recommended to instead to use `jj new` and `jj amend`. Creating /// a new revision enables being more intentional with respect to the existing revision. +/// +/// For more information, see https://github.com/martinvonz/jj/blob/main/docs/FAQ.md#how-do-i-resume-working-on-an-existing-change #[derive(clap::Args, Clone, Debug)] pub(crate) struct EditArgs { /// The commit to edit diff --git a/docs/FAQ.md b/docs/FAQ.md index 0315c701b5b..6c8f7ff3419 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -137,6 +137,17 @@ commit, then run `jj restore --from Y --to @-` to restore the parent commit to the old state, and `jj restore --from X` to restore the new working-copy commit to the new state. +### How do I resume working on an existing change? + +There are two ways to resume working on an earlier change: `jj new` then `jj amend`, +and `jj edit`. The first is generally recommended over the second for a few reasons, +which come down to how intentional you are with your changes. If the revision you +want to resume working on has a conflict, `jj edit` would restore the state with +plain-text conflict annotations. Editing those annotations incorrectly or by +accident can lead to undesired output from conflict resolution. If you amend a new +revision onto a revision that contains a conflict, the conflict will be updated to +correctly reflect your new changes. + ### How do I deal with divergent changes ('??' after the [change ID])? A [divergent change][glossary_divergent_change] represents a change that has two