truffle migrate --compile-all --reset --network ganache
Compiling your contracts...
Everything is up to date, there is nothing to compile.
Unknown network "ganache". See your Truffle configuration file for available networks.
By default you don't need to specify the --network, truffle will automatically connect to Ganache. On the other hand, if you want to have the name ganache configured as a network, you will have to modify your truffle-config.js file as follows:
networks: {
//...,
ganache: {
host: "127.0.0.1",
port: YOUR_GANACHE_PORT, // (default: 5777)
network_id: "YOUR_GANACHE_NETWORK_ID", // (default: *)
},
//...
}