@@ -40,39 +40,38 @@ steps:
40402 ) [ Fork the Git-Sim codebase] ( https://github.com/initialcommit-com/git-sim/fork )
4141so that you have a copy on GitHub that you can clone and work with
42423 ) Clone the codebase down to your local machine
43- 4 ) For the code to run locally without getting a ` ModuleNotFoundError ` ,
44- you need to remove the import prefix ` git_sim. ` from imports (for example
45- ` from git_sim_base_command import GitSimBaseCommand ` ) in the following files:
46-
47- - __ main.py__
48- - git_sim.py
49- - git_sim_add.py
50- - git_sim_branch.py
51- - git_sim_cherrypick.py
52- - git_sim_commit.py
53- - git_sim_log.py
54- - git_sim_merge.py
55- - git_sim_rebase.py
56- - git_sim_reset.py
57- - git_sim_restore.py
58- - git_sim_revert.py
59- - git_sim_stash.py
60- - git_sim_status.py
61- - git_sim_tag.py
62-
63- There is probably a way around this. When I figure it out I'll update this guide.
64-
65- 5 ) You can run your local Git-Sim commands from within other local repos like this:
43+ 4 ) If you previously installed Git-Sim normally using pip, uninstall it first using:
6644
45+ ``` console
46+ $ pip uninstall git-sim
6747```
68- $ python ~/path/to/git-sim/git_sim/__main__.py [global options] <subcommand> [subcommand options]
48+
49+ 5 ) To run the code locally from source, install the developement package by running:
50+
51+ ``` console
52+ $ cd path/to/git-sim
53+ $ python -m pip install -e .
6954```
7055
71- For example, you can simulate the ` git add ` command locally like this:
56+ This will install sources from your cloned repo such that you can edit the source and the changes are reflected instantly.
57+
58+ If you already have the dependencies, you can ignore those using the ` --no-deps ` flag:
59+
60+ ``` console
61+ $ python -m pip install --no-deps -e .
62+ ```
63+
64+ 6 ) You can run your local Git-Sim commands from within other local repos like this:
7265
66+ ``` console
67+ $ git-sim [global options] < subcommand> [subcommand options]
7368```
69+
70+ For example, you can simulate the ` git add ` command locally like this:
71+
72+ ``` console
7473$ cd path/to/any/local/git/repo
75- $ python ~/path/to/ git-sim/git_sim/__main__.py --animate add newfile.txt
74+ $ git-sim --animate add newfile.txt
7675```
7776
78776 ) After pushing your code changes up to your fork, [ submit a pull request] ( https://github.com/initialcommit-com/git-sim/compare ) for me
0 commit comments