How to deploy a canister locally to an existing (already running) replica from a separate directory/repo

I just deployed and ICRC locally but since I did it from its own directory (following these instructions icrc1/ at main · NatLabs/icrc1 · GitHub), I had to do create a new replica with

dfx start --background --clean

Whereas I want it to be deployed in an already-running replica (running from another directory).

How do I instruct the deployment of the ICRC token such that it’s deployed to the existing replica without co-mingling both the token and the other project’s repos?

Would that be the right approach? The aim is to call and interact with the ICRC canister from my other canister deployed in the other replica.

I do not see anything in these instructions that would require --clean. If you just skip that flag, you should be good to go. --clean wipes all state from previous runs, so please still use it occasionally if you run into weird problems or if you want to install the nns canisters.

dfx didn’t seem to “see” the other replica running from another project directory, so --clean didn’t seem to be the cause. In the end I just added the new canister to the original project directory to run them together.