Fork the dependency, integrate it as a Git submodule, update your main project's Cargo.toml to use the local path, and commit changes in both repositories.