rm
- Usage:
java gitlet.Main rm [file name]
- Description: Unstage the file if it is currently staged for addition.
If the file is tracked in the current commit, stage it for removal and
remove the file from the working directory if the user has not already
done so (do not remove it unless
it is tracked in the current commit).
- Runtime: Should run in constant time relative to any significant measure.
- Failure cases: If the file is neither staged nor tracked by the
head commit, print the error message
No reason to remove the file.
- Dangerous?: Yes (although if you use our utility methods, you will only
hurt your repository files, and not all the other files in your
directory.)
- Our line count: ~20