# `TF003` Use Git for versionning Setup a git repo with the current files, to be able to revert any change if desired :::{dropdown} Is a test for :open: :icon: check-circle-fill :color: primary [`SF004` Version controlled](/requirements/SF004) ::: ## Initial state The expected state is the final state of [`TF002` Generate a PDF](/tests/TF002) ## Procedure ### Step 1 Initialize a git repository ```console $ git init Initialized empty Git repository in [...] ``` ### Step 2 Start tracking the specification files ```console $ git add spec.yaml specification.typ ``` ### Step 3 Save current files version ```console $ git commit -m "Initial commit: first 2 requirements and 1 test" ``` ### Step 4 Give a name to that version ```console $ git tag 0.0.1 ``` ### Step 5 Delete a requirement in spec.yaml ```console $ cat spec.yaml ``` ```yaml kind: requirements category: functional requirements: - id: S01 short: Lorem ipsum long: The first requirement ``` ### Step 6 Confirm the requirement is gone ```console $ typst compile specification.typ && open specification.pdf ``` ### Step 7 Revert the deletion ```console $ git checkout -- . ``` ### Step 8 Confirm the requirement is back ```console $ typst compile specification.typ && open specification.pdf ```