Skip to content

Commit 2355ebc

Browse files
Update readme to add documentation for init, config, and remote
Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent fa3e8f7 commit 2355ebc

File tree

1 file changed

+127
-109
lines changed

1 file changed

+127
-109
lines changed

README.md

Lines changed: 127 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Git-Sim is Free and Open-Source Software (FOSS). Your support will help me work
3535

3636
## Features
3737
- Run a one-liner git-sim command in the terminal to generate a custom Git command visualization (.jpg) from your repo
38-
- Supported commands: `log`, `status`, `add`, `restore`, `commit`, `stash`, `branch`, `tag`, `reset`, `revert`, `merge`, `rebase`, `cherry-pick`, `switch`, `checkout`, `fetch`, `pull`, `push`, `clone`, `rm`, `mv`, `clean`
38+
- Supported commands: `add`, `branch`, `checkout`, `cherry-pick`, `clean`, `clone`, `commit`, `config`, `fetch`, `init`, `log`, `merge`, `mv`, `pull`, `push`, `rebase`, `remote`, `reset`, `restore`, `revert`, `rm`, `stash`, `status`, `switch`, `tag`
3939
- 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)
4040
- Color commits by parameter, such as author with the `--color-by=author` option
4141
- Choose between dark mode (default) and light mode
@@ -135,7 +135,8 @@ $ git-sim <subcommand> -h
135135
* [Manim (Community version)](https://www.manim.community/)
136136

137137
## Commands
138-
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", "fetch", "pull", "push", "clone", "rm", "mv", "clean" along with corresponding options.
138+
Basic usage is similar to Git itself - `git-sim` takes a familiar set of subcommands including "add", "branch", "checkout", "cherry-pick", "clean", "clone", "commit", "config", "fetch", "init", "log", "merge", "mv", "pull", "push", "rebase", "remote", "reset", "restore", "revert", "rm", "stash", "status", "switch", "tag" along with corresponding options.
139+
139140

140141
```console
141142
$ git-sim [global options] <subcommand> [subcommand options]
@@ -177,23 +178,6 @@ The `[subcommand options]` are like regular Git options specific to the specifie
177178

178179
The following is a list of Git commands that can be simulated and their corresponding options/flags.
179180

180-
### git log
181-
Usage: `git-sim log [-n <number>] [--all]`
182-
183-
- Simulated output will show the most recent 5 commits on the active branch by default
184-
- Use `-n <number>` to set number of commits to display from each branch head
185-
- Set `--all` to display all local branches in the log output
186-
187-
![git-sim-log_01-05-23_22-02-39](https://user-images.githubusercontent.com/49353917/210940300-aadd14c6-72ab-4529-a1be-b494ed5dd4c9.jpg)
188-
189-
### git status
190-
Usage: `git-sim status`
191-
192-
- Simulated output will show the state of the working directory, staging area, and untracked files
193-
- Note that simulated output will also show the most recent 5 commits on the active branch
194-
195-
![git-sim-status_01-05-23_22-06-28](https://user-images.githubusercontent.com/49353917/210940685-735665e2-fa12-4043-979c-54c295b13800.jpg)
196-
197181
### git add
198182
Usage: `git-sim add <file 1> <file 2> ... <file n>`
199183

@@ -203,14 +187,46 @@ Usage: `git-sim add <file 1> <file 2> ... <file n>`
203187

204188
![git-sim-add_01-05-23_22-07-40](https://user-images.githubusercontent.com/49353917/210940814-7e8dc318-6116-4e56-b415-bc547401a56a.jpg)
205189

206-
### git restore
207-
Usage: `git-sim restore <file 1> <file 2> ... <file n>`
190+
### git branch
191+
Usage: `git-sim branch <new branch name>`
208192

209-
- Specify one or more `<file>` as a *modified* working directory file, or staged file
210-
- Simulated output will show files being moved back to the working directory or discarded changes
193+
- Specify `<new branch name>` as the name of the new branch to simulate creation of
194+
- Simulated output will show the newly create branch ref along with most recent 5 commits on the active branch
195+
196+
![git-sim-branch_01-05-23_22-13-17](https://user-images.githubusercontent.com/49353917/210941509-2a42a7a4-2168-4f62-913f-3f6fe74a0684.jpg)
197+
198+
### git checkout
199+
Usage: `git-sim checkout [-b] <branch>`
200+
201+
- Checks out `<branch>` into the working directory, i.e. moves `HEAD` to the specified `<branch>`
202+
- The `-b` flag creates a new branch with the specified name `<branch>` and checks it out, assuming it doesn't already exist
203+
204+
![git-sim-checkout_04-09-23_21-46-04](https://user-images.githubusercontent.com/49353917/230827836-e9f23a0e-2576-4716-b2fb-6327d3cf9b22.jpg)
205+
206+
### git cherry-pick
207+
Usage: `git-sim cherry-pick <commit>`
208+
209+
- Specify `<commit>` as a ref (branch name/tag) or commit ID to cherry-pick onto the active branch
210+
- Supports editing the cherry-picked commit message with: `$ git-sim cherry-pick <commit> -e "Edited commit message"`
211+
212+
![git-sim-cherry-pick_01-05-23_22-23-08](https://user-images.githubusercontent.com/49353917/210942811-fa5155b1-4c6f-4afc-bea2-d39b4cd594aa.jpg)
213+
214+
### git clean
215+
Usage: `git-sim clean`
216+
217+
- Simulated output will show untracked files being deleted
218+
- Since this is just a simulation, no need to specify `-i`, `-n`, `-f` as in regular Git
211219
- Note that simulated output will also show the most recent 5 commits on the active branch
212220

213-
![git-sim-restore_01-05-23_22-09-14](https://user-images.githubusercontent.com/49353917/210941009-e6bf7271-ce9b-4e41-9a0b-24cc4b8d3b15.jpg)
221+
![git-sim-clean_04-09-23_22-05-54](https://user-images.githubusercontent.com/49353917/230830043-779e7230-f439-461a-a408-b19b263e86e4.jpg)
222+
223+
### git clone
224+
Usage: `git-sim clone <url>`
225+
226+
- Clone the remote repo from `<url>` (web URL or filesystem path) to a new folder in the current directory
227+
- Output will report if clone operation is successful and show log of local clone
228+
229+
![git-sim-clone_04-09-23_21-51-53](https://user-images.githubusercontent.com/49353917/230828521-80c8d2d1-2a31-46bb-aeed-746f0441c86e.jpg)
214230

215231
### git commit
216232
Usage: `git-sim commit -m "Commit message"`
@@ -223,49 +239,32 @@ Usage: `git-sim commit -m "Commit message"`
223239

224240
![git-sim-commit_01-05-23_22-10-21](https://user-images.githubusercontent.com/49353917/210941149-d83677a1-3ab7-4880-bc0f-871b1f150087.jpg)
225241

226-
### git stash
227-
Usage: `git-sim stash [push|pop|apply] <file>`
228-
229-
- Specify one or more `<file>` as a *modified* working directory file, or staged file
230-
- If no `<file>` is specified, all available files will be included
231-
- Simulated output will show files being moved in/out of the Git stash
232-
- Note that simulated output will also show the most recent 5 commits on the active branch
233-
234-
![git-sim-stash_01-05-23_22-11-18](https://user-images.githubusercontent.com/49353917/210941254-69c80b63-5c06-411a-a36a-1454b2906ee8.jpg)
235-
236-
### git branch
237-
Usage: `git-sim branch <new branch name>`
238-
239-
- Specify `<new branch name>` as the name of the new branch to simulate creation of
240-
- Simulated output will show the newly create branch ref along with most recent 5 commits on the active branch
241-
242-
![git-sim-branch_01-05-23_22-13-17](https://user-images.githubusercontent.com/49353917/210941509-2a42a7a4-2168-4f62-913f-3f6fe74a0684.jpg)
242+
### git config
243+
Usage: `git-sim config [--list] <section.option> <value>`
243244

244-
### git tag
245-
Usage: `git-sim tag <new tag name>`
245+
- Simulated output describes the specified configuration change
246+
- Use `--list` or `-l` to display all configuration
246247

247-
- Specify `<new tag name>` as the name of the new tag to simulate creation of
248-
- Simulated output will show the newly create tag ref along with most recent 5 commits on the active branch
248+
### git fetch
249+
Usage: `git-sim fetch <remote> <branch>`
249250

250-
![git-sim-tag_01-05-23_22-14-18](https://user-images.githubusercontent.com/49353917/210941647-79376ff7-2941-42b3-964a-b1d3a404a4fe.jpg)
251+
- Fetches the specified `<branch>` from the specified `<remote>` to the local repo
251252

252-
### git reset
253-
Usage: `git-sim reset <reset-to> [--mixed|--soft|--hard]`
253+
![git-sim-fetch_04-09-23_21-47-59](https://user-images.githubusercontent.com/49353917/230828090-acae8979-4097-43a8-96ea-525890e0e0a8.jpg)
254254

255-
- Specify `<reset-to>` as any commit id, branch name, tag, or other ref to simulate reset to from the current HEAD (default: `HEAD`)
256-
- As with a normal git reset command, default reset mode is `--mixed`, but can be specified using `--soft`, `--hard`, or `--mixed`
257-
- Simulated output will show branch/HEAD resets and resulting state of the working directory, staging area, and whether any file changes would be deleted by running the actual command
255+
### git init
256+
Usage: `git-sim init`
258257

259-
![git-sim-reset_01-05-23_22-15-49](https://user-images.githubusercontent.com/49353917/210941835-80f032d2-4f06-4032-8dd0-98c8a2569049.jpg)
258+
- Simulated output describes the initialized `.git/` directory and it's contents
260259

261-
### git revert
262-
Usage: `git-sim revert <to-revert>`
260+
### git log
261+
Usage: `git-sim log [-n <number>] [--all]`
263262

264-
- Specify `<to-revert>` as any commit id, branch name, tag, or other ref to simulate revert for
265-
- Simulated output will show the new commit which reverts the changes from `<to-revert>`
266-
- Simulated output will include the next 4 most recent commits on the active branch
263+
- Simulated output will show the most recent 5 commits on the active branch by default
264+
- Use `-n <number>` to set number of commits to display from each branch head
265+
- Set `--all` to display all local branches in the log output
267266

268-
![git-sim-revert_01-05-23_22-16-59](https://user-images.githubusercontent.com/49353917/210941979-6db8b55c-2881-41d8-9e2e-6263b1dece13.jpg)
267+
![git-sim-log_01-05-23_22-02-39](https://user-images.githubusercontent.com/49353917/210940300-aadd14c6-72ab-4529-a1be-b494ed5dd4c9.jpg)
269268

270269
### git merge
271270
Usage: `git-sim merge <branch> [-m "Commit message"] [--no-ff]`
@@ -279,43 +278,15 @@ Usage: `git-sim merge <branch> [-m "Commit message"] [--no-ff]`
279278

280279
![git-sim-merge_01-05-23_09-44-46](https://user-images.githubusercontent.com/49353917/210942030-c7229488-571a-4943-a1f4-c6e4a0c8ccf3.jpg)
281280

282-
### git rebase
283-
Usage: `git-sim rebase <new-base>`
284-
285-
- Specify `<new-base>` as the branch name to rebase the active branch onto
286-
287-
![git-sim-rebase_01-05-23_09-53-34](https://user-images.githubusercontent.com/49353917/210942598-4ff8d1e6-464d-48f3-afb9-f46f7ec4828c.jpg)
288-
289-
### git cherry-pick
290-
Usage: `git-sim cherry-pick <commit>`
291-
292-
- Specify `<commit>` as a ref (branch name/tag) or commit ID to cherry-pick onto the active branch
293-
- Supports editing the cherry-picked commit message with: `$ git-sim cherry-pick <commit> -e "Edited commit message"`
294-
295-
![git-sim-cherry-pick_01-05-23_22-23-08](https://user-images.githubusercontent.com/49353917/210942811-fa5155b1-4c6f-4afc-bea2-d39b4cd594aa.jpg)
296-
297-
### git switch
298-
Usage: `git-sim switch [-c] <branch>`
299-
300-
- Switches the checked-out branch to `<branch>`, i.e. moves `HEAD` to the specified `<branch>`
301-
- The `-c` flag creates a new branch with the specified name `<branch>` and switches to it, assuming it doesn't already exist
302-
303-
![git-sim-switch_04-09-23_21-42-43](https://user-images.githubusercontent.com/49353917/230827783-a8740ace-b66f-4cac-b94e-5d101d27e0b5.jpg)
304-
305-
### git checkout
306-
Usage: `git-sim checkout [-b] <branch>`
307-
308-
- Checks out `<branch>` into the working directory, i.e. moves `HEAD` to the specified `<branch>`
309-
- The `-b` flag creates a new branch with the specified name `<branch>` and checks it out, assuming it doesn't already exist
310-
311-
![git-sim-checkout_04-09-23_21-46-04](https://user-images.githubusercontent.com/49353917/230827836-e9f23a0e-2576-4716-b2fb-6327d3cf9b22.jpg)
312-
313-
### git fetch
314-
Usage: `git-sim fetch <remote> <branch>`
281+
### git mv
282+
Usage: `git-sim mv <file> <new file>`
315283

316-
- Fetches the specified `<branch>` from the specified `<remote>` to the local repo
284+
- Specify `<file>` as file to update name/path
285+
- Specify `<new file>` as new name/path of file
286+
- Simulated output will show the name/path of the file being updated
287+
- Note that simulated output will also show the most recent 5 commits on the active branch
317288

318-
![git-sim-fetch_04-09-23_21-47-59](https://user-images.githubusercontent.com/49353917/230828090-acae8979-4097-43a8-96ea-525890e0e0a8.jpg)
289+
![git-sim-mv_04-09-23_22-05-13](https://user-images.githubusercontent.com/49353917/230829978-0a64dbe2-d974-4cef-9c6e-ed26e987342f.jpg)
319290

320291
### git pull
321292
Usage: `git-sim pull [<remote> <branch>]`
@@ -335,13 +306,45 @@ Usage: `git-sim push [<remote> <branch>]`
335306

336307
![git-sim-push_04-21-23_13-41-57](https://user-images.githubusercontent.com/49353917/233731005-51fd7887-ae14-4ceb-a5d5-e5aed79e9fd8.jpg)
337308

338-
### git clone
339-
Usage: `git-sim clone <url>`
309+
### git rebase
310+
Usage: `git-sim rebase <new-base>`
340311

341-
- Clone the remote repo from `<url>` (web URL or filesystem path) to a new folder in the current directory
342-
- Output will report if clone operation is successful and show log of local clone
312+
- Specify `<new-base>` as the branch name to rebase the active branch onto
343313

344-
![git-sim-clone_04-09-23_21-51-53](https://user-images.githubusercontent.com/49353917/230828521-80c8d2d1-2a31-46bb-aeed-746f0441c86e.jpg)
314+
![git-sim-rebase_01-05-23_09-53-34](https://user-images.githubusercontent.com/49353917/210942598-4ff8d1e6-464d-48f3-afb9-f46f7ec4828c.jpg)
315+
316+
### git remote
317+
Usage: `git-sim remote [add|rename|remove|get-url|set-url] [<remote>] [<url>]`
318+
319+
- Simulated output will show remotes being added, renamed, removed, modified as indicated
320+
- Running `git-sim remote` with no options will list all existing remotes and their details
321+
322+
### git reset
323+
Usage: `git-sim reset <reset-to> [--mixed|--soft|--hard]`
324+
325+
- Specify `<reset-to>` as any commit id, branch name, tag, or other ref to simulate reset to from the current HEAD (default: `HEAD`)
326+
- As with a normal git reset command, default reset mode is `--mixed`, but can be specified using `--soft`, `--hard`, or `--mixed`
327+
- Simulated output will show branch/HEAD resets and resulting state of the working directory, staging area, and whether any file changes would be deleted by running the actual command
328+
329+
![git-sim-reset_01-05-23_22-15-49](https://user-images.githubusercontent.com/49353917/210941835-80f032d2-4f06-4032-8dd0-98c8a2569049.jpg)
330+
331+
### git restore
332+
Usage: `git-sim restore <file 1> <file 2> ... <file n>`
333+
334+
- Specify one or more `<file>` as a *modified* working directory file, or staged file
335+
- Simulated output will show files being moved back to the working directory or discarded changes
336+
- Note that simulated output will also show the most recent 5 commits on the active branch
337+
338+
![git-sim-restore_01-05-23_22-09-14](https://user-images.githubusercontent.com/49353917/210941009-e6bf7271-ce9b-4e41-9a0b-24cc4b8d3b15.jpg)
339+
340+
### git revert
341+
Usage: `git-sim revert <to-revert>`
342+
343+
- Specify `<to-revert>` as any commit id, branch name, tag, or other ref to simulate revert for
344+
- Simulated output will show the new commit which reverts the changes from `<to-revert>`
345+
- Simulated output will include the next 4 most recent commits on the active branch
346+
347+
![git-sim-revert_01-05-23_22-16-59](https://user-images.githubusercontent.com/49353917/210941979-6db8b55c-2881-41d8-9e2e-6263b1dece13.jpg)
345348

346349
### git rm
347350
Usage: `git-sim rm <file 1> <file 2> ... <file n>`
@@ -352,24 +355,39 @@ Usage: `git-sim rm <file 1> <file 2> ... <file n>`
352355

353356
![git-sim-rm_04-09-23_22-01-29](https://user-images.githubusercontent.com/49353917/230829899-f5d688ea-bc8e-46f9-a54a-55d251c8915d.jpg)
354357

355-
### git mv
356-
Usage: `git-sim mv <file> <new file>`
358+
### git stash
359+
Usage: `git-sim stash [push|pop|apply] <file>`
357360

358-
- Specify `<file>` as file to update name/path
359-
- Specify `<new file>` as new name/path of file
360-
- Simulated output will show the name/path of the file being updated
361+
- Specify one or more `<file>` as a *modified* working directory file, or staged file
362+
- If no `<file>` is specified, all available files will be included
363+
- Simulated output will show files being moved in/out of the Git stash
361364
- Note that simulated output will also show the most recent 5 commits on the active branch
362365

363-
![git-sim-mv_04-09-23_22-05-13](https://user-images.githubusercontent.com/49353917/230829978-0a64dbe2-d974-4cef-9c6e-ed26e987342f.jpg)
366+
![git-sim-stash_01-05-23_22-11-18](https://user-images.githubusercontent.com/49353917/210941254-69c80b63-5c06-411a-a36a-1454b2906ee8.jpg)
364367

365-
### git clean
366-
Usage: `git-sim clean`
368+
### git status
369+
Usage: `git-sim status`
367370

368-
- Simulated output will show untracked files being deleted
369-
- Since this is just a simulation, no need to specify `-i`, `-n`, `-f` as in regular Git
371+
- Simulated output will show the state of the working directory, staging area, and untracked files
370372
- Note that simulated output will also show the most recent 5 commits on the active branch
371373

372-
![git-sim-clean_04-09-23_22-05-54](https://user-images.githubusercontent.com/49353917/230830043-779e7230-f439-461a-a408-b19b263e86e4.jpg)
374+
![git-sim-status_01-05-23_22-06-28](https://user-images.githubusercontent.com/49353917/210940685-735665e2-fa12-4043-979c-54c295b13800.jpg)
375+
376+
### git switch
377+
Usage: `git-sim switch [-c] <branch>`
378+
379+
- Switches the checked-out branch to `<branch>`, i.e. moves `HEAD` to the specified `<branch>`
380+
- The `-c` flag creates a new branch with the specified name `<branch>` and switches to it, assuming it doesn't already exist
381+
382+
![git-sim-switch_04-09-23_21-42-43](https://user-images.githubusercontent.com/49353917/230827783-a8740ace-b66f-4cac-b94e-5d101d27e0b5.jpg)
383+
384+
### git tag
385+
Usage: `git-sim tag <new tag name>`
386+
387+
- Specify `<new tag name>` as the name of the new tag to simulate creation of
388+
- Simulated output will show the newly create tag ref along with most recent 5 commits on the active branch
389+
390+
![git-sim-tag_01-05-23_22-14-18](https://user-images.githubusercontent.com/49353917/210941647-79376ff7-2941-42b3-964a-b1d3a404a4fe.jpg)
373391

374392
## Video animation examples
375393
```console

0 commit comments

Comments
 (0)