Skip to content

Commit

Permalink
docs: explain when and how to use -d and -t
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Jul 7, 2021
1 parent 5ea945d commit 4af132a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,19 @@ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --gen
In addition to the `package` and `destructiveChanges` folders, the `sfdx sgd:source:delta` command will also produce a copy of the added/changed files in the ouput folder.

_Content of the output folder when using the --generate-delta option, with the same scenario as above:_

![delta-source](/img/example_generateDelta.png)

> /!\ the `--generate-delta (-d)` can only be used when `--to (-t)` value is set to "HEAD" or to the "HEAD commit SHA".
> If you need to use it with `--to (-t)` pointing to another commit than "HEAD", just checkout that commit first and then use `--generate-delta (-d)`. Exemple:
>
> ```sh
> # move HEAD to past commit we are interested in
> $ git checkout <not-HEAD-commit-sha>
> # You can omit --to, it will take "HEAD" as default value
> $ sfdx sgd:source:delta --from "HEAD^" --output changed-sources/ --generate-delta
> ```
### Exclude some metadata only from destructiveChanges.xml:
The `--ignore [-i]` parameter allows you to specify an [ignore file](https://git-scm.com/docs/gitignore) used to filter the
Expand Down

0 comments on commit 4af132a

Please sign in to comment.