Only ignore the top level `target` directory.
Cargo.lock should be checked in.