Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Delete and undo through Git

Weik.io 2026.2

Remove a file and apply with --prune to delete what it described, and undo a change with git revert through the same pipeline. Product page · Video

Watch: Deleting and undoing through Git, 3:59

The video deletes a deployment by removing its document from the repository and undoes the delete with git revert.

On this page

To delete something you keep in Git, commit the removal of its file. Before anyone merges, the pull request’s plan lists the deletion as would delete. The next apply of the folder with --prune deletes it in Weik.io.

What prune deletes#

An apply with --prune finance deletes what the folder no longer has. It deletes only what earlier applies of the same folder put in Weik.io with the same --prune finance. A removed file deletes what it described:

  • A deployment file removed from an environment’s folder undeploys the integration in that environment.
  • An API deployment file removed from an environment’s folder undeploys the API version there.
  • An integration directory removed from shared/ deletes the integration with its versions and the values set for that integration only, once no environment runs it.

Use one name for the repository in every job, so a plan you make on your own machine with --prune finance shows the same deletions as the pipeline’s next apply:

Terminal
$ weikio diff -f ./finance/production --env production --prune finance
$ weikio apply -f ./finance/production --env production --prune finance -y

What prune never touches#

  • Another folder’s documents, or documents applied under another name
  • Anything made by hand in the CLI or the admin UI, including something deleted and made again by hand under the same name
  • Values set with weikio secret set
  • Subscriptions a consumer created
  • A project the folder no longer has, or an environment the job doesn’t name

The first apply of a folder with --prune deletes nothing and says so. The first apply after you move or rename the folder does the same.

Remove an integration#

To remove an integration, delete its directory from ./finance/shared and its deployment files from every environment’s folder in one commit. Each environment’s apply undeploys the integration there. Once no environment runs the integration, the next apply of shared/ deletes it. Until then, the apply of shared/ keeps the integration and warns where it still runs.

Every environment uses the files in shared/, so a file removed there is deleted for all environments in the devtest job, before production’s approval. The plan marks such a deletion with a warning.

What the integration stored stays in each environment until that environment’s retention removes it, after 30 days by default:

  • Run records
  • Channel events
  • Dead letters

Undo with git revert#

To undo a change, revert its commit with git revert and merge the revert through the same pull request and approval as any other change:

Terminal
$ git revert 4f2a9c1
$ git push origin HEAD:revert-promotion

Reverting a promotion puts the earlier version back in the deployment file. That version already exists, so the apply deploys it without a build.

Reverting a delete brings the files back. The next apply creates the integration again under a new ID and builds its versions from the directory. Secret values set for that integration alone have to be set again with weikio secret set.

In an incident#

You can run weikio rollback or weikio stop by hand to stop the damage first. The next apply from Git puts back what the repository describes, so commit the same fix to the repository afterwards. Until you do, weikio diff shows the difference as drift.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo