mirror of https://github.com/deuill/grawkit.git
README.md: Simplify and improve examples and usage information
This commit is contained in:
parent
892a5cec4d
commit
9357d4b942
105
README.md
105
README.md
|
@ -8,24 +8,23 @@ This tool was created in support of the ["Orthogonal Git Workflow"][orthogonal-g
|
||||||
|
|
||||||
A `Makefile` is provided for running tests and producing documentation for Grawkit. Run `make help` in the project root for more information.
|
A `Makefile` is provided for running tests and producing documentation for Grawkit. Run `make help` in the project root for more information.
|
||||||
|
|
||||||
A full test-suite is provided (depending only on `make` and `awk`), which should serve as a good example of the existing feature-set.
|
A full test-suite is provided (depending only on `make` and `awk`), which should serve as a good example of the existing feature-set. Run it with `make test`.
|
||||||
|
|
||||||
## Status & Examples
|
## Installation
|
||||||
|
|
||||||
Grawkit has basic support for common `git` commands such as `git branch`, `git tag` and `git merge`, allowing for fairly complex graphs. The integrated test-suite serves as an example, presented here:
|
Copy the included `grawkit` AWK script into your local search path (most commonly
|
||||||
|
`$HOME/.local/bin`), or just use it directly in this folder.
|
||||||
|
|
||||||
<table>
|
## Status & Usage
|
||||||
<tr>
|
|
||||||
<th width="40%">Command-Line</th>
|
Grawkit has basic support for common `git` commands such as `git branch`, `git tag` and `git merge`, allowing for fairly complex graphs. The integrated test-suite serves as an example, check the `tests` folder for more.
|
||||||
<th>Generated Graph</th>
|
|
||||||
</tr>
|
In order to use this tool, either run the `grawkit` executable against a file containing supported
|
||||||
<tr>
|
`git` commands (any command not recognized will be silently ignored), or pass these in standard
|
||||||
<th><pre><code>git commit -m "Adding a new commit"
|
input. For instance, given the following file `test.txt`:
|
||||||
git commit</code></pre></th>
|
|
||||||
<th><img src="https://rawgit.com/deuill/grawkit/b5708197cfcc526498053f9a07565a2d77615054/tests/02-master.svg" alt=""></th>
|
```sh
|
||||||
</tr>
|
git commit -m "Commit on master"
|
||||||
<tr>
|
|
||||||
<th><pre><code>git commit -m "Commit on master"
|
|
||||||
git commit -m "More stuff"
|
git commit -m "More stuff"
|
||||||
|
|
||||||
git branch test-stuff
|
git branch test-stuff
|
||||||
|
@ -35,78 +34,20 @@ git commit -m 'Testing stuff'
|
||||||
git commit
|
git commit
|
||||||
|
|
||||||
git checkout master
|
git checkout master
|
||||||
git commit</code></pre></th>
|
|
||||||
<th><img src="https://rawgit.com/deuill/grawkit/b5708197cfcc526498053f9a07565a2d77615054/tests/03-branch.svg" alt=""></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><pre><code>git branch test-merging
|
|
||||||
|
|
||||||
git commit -m "Commit on master"
|
|
||||||
git commit -m "Still on master"
|
|
||||||
|
|
||||||
git checkout test-merging
|
|
||||||
git commit -m 'A sample commit'
|
|
||||||
|
|
||||||
git checkout master
|
|
||||||
git commit -m "Another master commit"
|
|
||||||
|
|
||||||
git merge test-merging</code></pre></th>
|
|
||||||
<th><img src="https://rawgit.com/deuill/grawkit/b5708197cfcc526498053f9a07565a2d77615054/tests/04-merge.svg" alt=""></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><pre><code>git commit -m "Commit on master"
|
|
||||||
|
|
||||||
git branch test-first
|
|
||||||
git branch test-second
|
|
||||||
|
|
||||||
git commit -m "Still on master"
|
|
||||||
git tag v.1.0.0
|
|
||||||
|
|
||||||
git checkout test-first
|
|
||||||
git commit
|
git commit
|
||||||
|
```
|
||||||
|
|
||||||
git branch test-third
|
You can execute either:
|
||||||
|
|
||||||
git checkout test-second
|
```
|
||||||
git commit
|
cat test.txt | grawkit
|
||||||
git merge test-first
|
# or
|
||||||
git tag v.2.0.0-rc1
|
grawkit test.txt
|
||||||
|
```
|
||||||
|
|
||||||
git checkout master
|
Which will produce SVG markup to standard output, rendered as:
|
||||||
git merge test-second
|
|
||||||
|
|
||||||
git checkout test-third
|
<img src="https://rawgit.com/deuill/grawkit/892a5cec4dee58838fb18f87fcb00f9d8f4d35a8/tests/03-branch.svg" alt="">
|
||||||
git commit</code></pre></th>
|
|
||||||
<th><img src="https://rawgit.com/deuill/grawkit/b5708197cfcc526498053f9a07565a2d77615054/tests/05-multi-branch.svg" alt=""></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><pre><code>git branch develop
|
|
||||||
git checkout develop
|
|
||||||
git commit
|
|
||||||
|
|
||||||
git branch feature/XYZ-12_fix-foo
|
|
||||||
git checkout feature/XYZ-12_fix-foo
|
|
||||||
git commit
|
|
||||||
git commit
|
|
||||||
|
|
||||||
git checkout develop
|
|
||||||
git branch feature/ZZ-704_take-it-to-the-limit
|
|
||||||
git checkout feature/ZZ-704_take-it-to-the-limit
|
|
||||||
git commit
|
|
||||||
|
|
||||||
git checkout develop
|
|
||||||
git merge feature/XYZ-12_fix-foo
|
|
||||||
|
|
||||||
git branch feature/ABC-66_make-bar
|
|
||||||
git checkout feature/ABC-66_make-bar
|
|
||||||
git commit
|
|
||||||
git commit
|
|
||||||
|
|
||||||
git checkout develop
|
|
||||||
git merge feature/ZZ-704_take-it-to-the-limit</code></pre></th>
|
|
||||||
<th><img src="https://rawgit.com/deuill/grawkit/b5708197cfcc526498053f9a07565a2d77615054/tests/06-feature-branch.svg" alt=""></th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue