Skip to content

Commit 421aa1d

Browse files
Update README.md
Add images for new subcommands
1 parent 4ca3126 commit 421aa1d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Example: `$ git-sim merge <branch>`
1818
## Use cases
1919
- Visualize Git commands to understand their effects on your repo before actually running them
2020
- Prevent unexpected working directory and repository states by simulating before running
21-
- Share visualizations (jpg image or mp4 video) of your Git commands with your team, or the world
21+
- Share visualizations (jpg/png image or mp4/webm video) of your Git commands with your team, or the world
2222
- Save visualizations as a part of your team documentation to document workflow and prevent recurring issues
23-
- Create static Git diagrams (jpg) or dynamic animated videos (mp4) to speed up content creation
23+
- Create static Git diagrams (jpg/png) or dynamic animated videos (mp4/webm) to speed up content creation
2424
- Help visual learners understand how Git commands work
2525
- Combine with bundled command [git-dummy](https://github.com/initialcommit-com/git-dummy) to generate a dummy Git repo and then simulate operations on it
2626

@@ -289,44 +289,58 @@ Usage: `git-sim switch [-c] <branch>`
289289
- Switches the checked-out branch to `<branch>`, i.e. moves `HEAD` to the specified `<branch>`
290290
- The `-c` flag creates a new branch with the specified name `<branch>` and switches to it, assuming it doesn't already exist
291291

292+
![git-sim-switch_04-09-23_21-42-43](https://user-images.githubusercontent.com/49353917/230827783-a8740ace-b66f-4cac-b94e-5d101d27e0b5.jpg)
293+
292294
### git checkout
293295
Usage: `git-sim checkout [-b] <branch>`
294296

295297
- Checks out `<branch>` into the working directory, i.e. moves `HEAD` to the specified `<branch>`
296298
- The `-b` flag creates a new branch with the specified name `<branch>` and checks it out, assuming it doesn't already exist
297299

300+
![git-sim-checkout_04-09-23_21-46-04](https://user-images.githubusercontent.com/49353917/230827836-e9f23a0e-2576-4716-b2fb-6327d3cf9b22.jpg)
301+
298302
### git fetch
299303
Usage: `git-sim fetch <remote> <branch>`
300304

301305
- Fetches the specified `<branch>` from the specified `<remote>` to the local repo
302306

307+
![git-sim-fetch_04-09-23_21-47-59](https://user-images.githubusercontent.com/49353917/230828090-acae8979-4097-43a8-96ea-525890e0e0a8.jpg)
308+
303309
### git pull
304310
Usage: `git-sim pull [<remote> <branch>]`
305311

306312
- Pulls the specified `<branch>` from the specified `<remote>` to the local repo
307313
- If `<remote>` and `<branch>` are not specified, the active branch is pulled from the default remote
308314
- If merge conflicts occur, they are displayed in a table
309315

316+
![git-sim-pull_04-09-23_21-50-15](https://user-images.githubusercontent.com/49353917/230828298-455c0a9d-cf94-499e-9e35-623e7b218772.jpg)
317+
310318
### git push
311319
Usage: `git-sim push [<remote> <branch>]`
312320

313321
- Pushes the specified `<branch>` to the specified `<remote>` and displays the local result
314322
- If `<remote>` and `<branch>` are not specified, the active branch is pushed to the default remote
315323
- If the push fails due to remote changes that don't exist in the local repo, a message is included telling the user to pull first, along with color coding which commits need to be pulled
316324

325+
![git-sim-push_04-09-23_21-50-53](https://user-images.githubusercontent.com/49353917/230828366-75b67945-ddc2-4fb7-b306-acba6e191730.jpg)
326+
317327
### git clone
318328
Usage: `git-sim clone <url>`
319329

320330
- Clone the remote repo from `<url>` (web URL or filesystem path) to a new folder in the current directory
321331
- Output will report if clone operation is successful and show log of local clone
322332

333+
![git-sim-clone_04-09-23_21-51-53](https://user-images.githubusercontent.com/49353917/230828521-80c8d2d1-2a31-46bb-aeed-746f0441c86e.jpg)
334+
323335
### git rm
324336
Usage: `git-sim rm <file 1> <file 2> ... <file n>`
325337

326338
- Specify one or more `<file>` as a *tracked* file
327339
- Simulated output will show files being removed from Git tracking
328340
- Note that simulated output will also show the most recent 5 commits on the active branch
329341

342+
![git-sim-rm_04-09-23_22-01-29](https://user-images.githubusercontent.com/49353917/230829899-f5d688ea-bc8e-46f9-a54a-55d251c8915d.jpg)
343+
330344
### git mv
331345
Usage: `git-sim mv <file> <new file>`
332346

@@ -335,13 +349,17 @@ Usage: `git-sim mv <file> <new file>`
335349
- Simulated output will show the name/path of the file being updated
336350
- Note that simulated output will also show the most recent 5 commits on the active branch
337351

352+
![git-sim-mv_04-09-23_22-05-13](https://user-images.githubusercontent.com/49353917/230829978-0a64dbe2-d974-4cef-9c6e-ed26e987342f.jpg)
353+
338354
### git clean
339355
Usage: `git-sim clean`
340356

341357
- Simulated output will show untracked files being deleted
342358
- Since this is just a simulation, no need to specify `-i`, `-n`, `-f` as in regular Git
343359
- Note that simulated output will also show the most recent 5 commits on the active branch
344360

361+
![git-sim-clean_04-09-23_22-05-54](https://user-images.githubusercontent.com/49353917/230830043-779e7230-f439-461a-a408-b19b263e86e4.jpg)
362+
345363
## Video animation examples
346364
```console
347365
$ git-sim --animate reset HEAD^

0 commit comments

Comments
 (0)