KabaForge
🌍 Türkçe · English · Deutsch · Français · Русский

05 — Deleting files and directories

Nothing is ever truly lost: a deletion is just another commit, and the old content stays in the history.

Deleting one file

  1. Open the file.
  2. Press the menu at the top right of the file view.
  3. Choose Delete this file (or use the 🗑️ icon next to the edit pencil).
  4. Write a commit message and press Commit Changes.

Deleting a folder

  1. Open the folder.
  2. Press the menu next to Add File.
  3. Choose Delete this directory.
  4. Commit.

Everything inside the folder is removed in that single commit.

Deleting several files at once

The browser deletes one path at a time. For a large clean-up, work from your computer (chapter 10):

git rm -r old-folder
git commit -m "remove old folder"
git push

Getting a deleted file back

  1. Open History on the folder that used to contain it, or the repository history.
  2. Find the commit before the deletion.
  3. Open the file at that commit and copy the content, or press Browse source at this point and recreate it.

Anything that was ever committed can be recovered. Something you typed in the editor but never committed cannot.

Careful with

⬅ Previous: 04 — Creating directories📚 All chaptersNext: 06 — Markdown basics ➡