Skip to content

Commit

Permalink
Git pre commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Nov 29, 2018
1 parent 5cef6fd commit 5054485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jupytext --to md --output - notebook.ipynb # display the markdown version o
jupytext --from ipynb --to py:percent # read ipynb from stdin and write double percent script on stdout
```

Jupytext is also available as a pre-commit hook. Use this if you want Jupytext to create and update the `.py` (or `.md`...) representation of the staged `.ipynb` notebooks. All you need is to create an executable `.git/hooks/pre-commit` file with the following content:
Jupytext is also available as a Git pre-commit hook. Use this if you want Jupytext to create and update the `.py` (or `.md`...) representation of the staged `.ipynb` notebooks. All you need is to create an executable `.git/hooks/pre-commit` file with the following content:
```bash
#!/bin/sh
jupytext --to py:light --pre-commit
Expand Down

0 comments on commit 5054485

Please sign in to comment.