Skip to content

Commit 0756826

Browse files
Update readme to include checkout subcommand info
Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent 9bb1784 commit 0756826

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Example: `$ git-sim merge <branch>`
2626

2727
## Features
2828
- Run a one-liner git-sim command in the terminal to generate a custom Git command visualization (.jpg) from your repo
29-
- Supported commands: `log`, `status`, `add`, `restore`, `commit`, `stash`, `branch`, `tag`, `reset`, `revert`, `merge`, `rebase`, `cherry-pick`, `switch`
29+
- Supported commands: `log`, `status`, `add`, `restore`, `commit`, `stash`, `branch`, `tag`, `reset`, `revert`, `merge`, `rebase`, `cherry-pick`, `switch`, `checkout`
3030
- Generate an animated video (.mp4) instead of a static image using the `--animate` flag (note: significant performance slowdown, it is recommended to use `--low-quality` to speed up testing and remove when ready to generate presentation-quality video)
3131
- Color commits by parameter, such as author the `--color-by=author` option
3232
- Choose between dark mode (default) and light mode
@@ -126,7 +126,7 @@ $ git-sim <subcommand> -h
126126
* [Manim (Community version)](https://www.manim.community/)
127127

128128
## Commands
129-
Basic usage is similar to Git itself - `git-sim` takes a familiar set of subcommands including "log", "status", "add", "restore", "commit", "stash", "branch", "tag", "reset", "revert", "merge", "rebase", "cherry-pick", "switch", along with corresponding options.
129+
Basic usage is similar to Git itself - `git-sim` takes a familiar set of subcommands including "log", "status", "add", "restore", "commit", "stash", "branch", "tag", "reset", "revert", "merge", "rebase", "cherry-pick", "switch", "checkout", along with corresponding options.
130130

131131
```console
132132
$ git-sim [global options] <subcommand> [subcommand options]
@@ -284,7 +284,13 @@ Usage: `git-sim cherry-pick <commit>`
284284
Usage: `git-sim switch [-c] <branch>`
285285

286286
- Switches the checked-out branch to `<branch>`, i.e. moves `HEAD` to the specified `<branch>`
287-
- The `-c` flag creates a new branch with the specified name `<branch>`, assuming it doesn't already exist
287+
- The `-c` flag creates a new branch with the specified name `<branch>` and switches to it, assuming it doesn't already exist
288+
289+
### git checkout
290+
Usage: `git-sim checkout [-b] <branch>`
291+
292+
- Checks out `<branch>` into the working directory, i.e. moves `HEAD` to the specified `<branch>`
293+
- The `-b` flag creates a new branch with the specified name `<branch>` and checks it out, assuming it doesn't already exist
288294

289295
## Video animation examples
290296
```console

0 commit comments

Comments
 (0)