diff --git a/README.md b/README.md index 524c3a1..423ca64 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,55 @@ Cargo-vcs is a Cargo extension that adds version control helpers to help manage - `cargo vcs status` - for brief overview - `cargo vcs status -v` - for verbose view +``` +$ cargo vcs status +Workspace is set to profile: new [.../rust/embedded] MSRV: 1.59.0 + +** Projects with uncommitted changes ** + +redv: refs/heads/e-h-1.0.0-alpha.7 [.../rust/embedded/apps/redv] +└── [CHANGES] + └── src/main.rs + +e310x-hal: refs/heads/e-h-1.0.0-alpha.7 [.../rust/embedded/e310/e310x-hal] +└── [CHANGES] + ├── src/spi/bus.rs + └── src/spi/config.rs +``` + ### Switch to a branch or commit on workspace members - `cargo vcs checkout master` - switch to master on all workspace members - `cargo vcs checkout master -p one_project` - switch on specific member only +``` +$ cargo vcs checkout master +redv set to refs/heads/master +embedded-hal set to refs/heads/master +e310x set to refs/heads/master +e310x-hal set to refs/heads/master +hifive1 set to refs/heads/master +riscv set to refs/heads/master +riscv-rt set to refs/heads/master +mipidsi set to refs/heads/master +``` -### Save currently set workspace branches as a profile +### Working with profiles - `cargo vcs profile save profile1` - saves current repo state of each workspace member under the name `profile1` - -### Switch to a previously saved workspace profile - - `cargo vcs profile set profile1` - switches all workspace member repositories to state saved in `profile1` +``` +$ cargo vcs profile set new +redv set to refs/heads/e-h-1.0.0-alpha.7 +embedded-hal set to refs/tags/v1.0.0-alpha.7 +e310x set to refs/heads/e-h-1.0.0-alpha.7 +e310x-hal set to refs/heads/e-h-1.0.0-alpha.7 +hifive1 set to refs/heads/v0.11.0-alpha.1 +riscv set to refs/heads/e-h-1.0.0-alpha.7 +riscv-rt set to refs/heads/e-h-1.0.0-alpha.7 +mipidsi set to refs/heads/v0.3.0-alpha.1 +``` + ## Profile configs Profile config is saved in the workspace root directory under the name `Cargo_vcs.toml`. Manual editing is possible but using `cargo vcs profile save ` is the preferred method as it resolves shortnames to full repository reference paths.