Skip to main content



stop tracking the specified files

Mark the specified files so they will no longer be tracked after the next commit.

Forget does not delete the files from the working copy. To delete the file from the working copy, see sl remove.

Forget does not remove files from the repository history. The files will only be removed in the next commit and its descendants.

To undo a forget before the next commit, see sl add.


  • forget newly-added binary files:
sl forget "set:added() and binary()"
  • forget files that would be excluded by .gitignore:
sl forget "set:gitignore()"

Returns 0 on success.


-I--includeinclude files matching the given patterns
-X--excludeexclude files matching the given patterns