Skip to content
Snippets Groups Projects
Commit be4c7eb9 authored by nfontrod's avatar nfontrod
Browse files

Readme.md: update readme

parent 450cc547
No related branches found
No related tags found
No related merge requests found
...@@ -156,7 +156,19 @@ $ gblk list ...@@ -156,7 +156,19 @@ $ gblk list
$ # checkout $ # checkout
$ # The next command is important: it will check if your results folder doesn't contain new results compared to your archive with the current git id. If there is no errors, then you wont lose any data $ # The next command is important: it will check if your results folder doesn't contain new results compared to your archive with the current git id. If there is no errors, then you wont lose any data
$ gblk pre-co $ gblk pre-co
$ git co <FIRSTCOMMIT> $ git co 62efe302b6c2e7ab0dfd9c08ddfb0a87ea699c6d
$ gblk co $ gblk co --mode hard # hard is used to delete file that were not present in the first commit. Otherwise only existing files at the destination commit will be updated.
$ ls results $ ls results
result.txt
``` ```
Not: if gblk pre-co says that you might lose data compared to the saved version of your actual commit, then use `gblk commit --update`.
### Example usage with git hooks
Git hooks are commands that can be automatically executed before and after some git commands. They are defined in the repository `.git/hooks`.
gblk can create three hooks:
* `post-commit` hook that executes `gblk commit` after every git commit
* `pre-checkout` hook that execute `gblk pre-co` before a checkout. If the command fails because some data in results folder are not saved, then the chekout is not executed.
* `post-checkout`hook that execute `gblk co` after git checkout.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment