You can type `gblk help <SUBCOMMAND>` or `gblk <SUBCOMMAND> --help` to display the help of any given subcommands.
You can type `gblk help <SUBCOMMAND>` or `gblk <SUBCOMMAND> --help` to display the help of any given subcommands.
Note that **`create-hooks` subcomand can be abbreviated to `ch`, and `checkout` subcommand can be abbreviated to `co`**. For example `gblk co --help` will work the same as `gblk checkout --help`
::: {.callout-note}
**`create-hooks` subcomand can be abbreviated to `ch`, and `checkout` subcommand can be abbreviated to `co`**. For example `gblk co --help` will work the same as `gblk checkout --help`
:::
## Example usage without git hooks
## Example usage without git hooks
...
@@ -210,7 +212,9 @@ gblk can create two hooks:
...
@@ -210,7 +212,9 @@ gblk can create two hooks:
As the `pre-checkout` hook doesn't exits, this is the `post-checkout` hook that
As the `pre-checkout` hook doesn't exits, this is the `post-checkout` hook that
is used to cancel the first checkout and check for data loss.
is used to cancel the first checkout and check for data loss.
Note that when gblk creates hooks it also modifies the `.git/config file` to add 3 aliases:
::: {.callout-note}
When gblk creates hooks it also modifies the `.git/config file` to add 3 aliases:
1. alias `co`: Performs a quiet checkout. This alias is used in step1 of the
1. alias `co`: Performs a quiet checkout. This alias is used in step1 of the
post-checkout hooks, so **it is recommended to use it when you perform a
post-checkout hooks, so **it is recommended to use it when you perform a
checkout**. It allows to have a quiet initial checkout that is then quietly
checkout**. It allows to have a quiet initial checkout that is then quietly
...
@@ -223,7 +227,7 @@ Note that when gblk creates hooks it also modifies the `.git/config file` to add
...
@@ -223,7 +227,7 @@ Note that when gblk creates hooks it also modifies the `.git/config file` to add
3. alias `cnh`: This alias performs a commit without using the `post-commit`
3. alias `cnh`: This alias performs a commit without using the `post-commit`
hooks.
hooks.
:::
```sh
```sh
$ mkdir project
$ mkdir project
...
@@ -420,9 +424,10 @@ The differences between the two files will be displayed with delta:
...
@@ -420,9 +424,10 @@ The differences between the two files will be displayed with delta:
Learn how to customize delta display by going [here](https://github.com/dandavison/delta)
Learn how to customize delta display by going [here](https://github.com/dandavison/delta)
Note that you can also display the differences between images. To be able to do
::: {.callout-note}
You can also display the differences between images. To be able to do
so, [imagemagick](https://imagemagick.org/script/index.php) must be installed.
so, [imagemagick](https://imagemagick.org/script/index.php) must be installed.
:::
If you plan to make pdf diff, you might want to change imagemagick `/etc/ImageMagick-[VERSION]/policy.xml` and replacing the line:
If you plan to make pdf diff, you might want to change imagemagick `/etc/ImageMagick-[VERSION]/policy.xml` and replacing the line:
...
@@ -461,10 +466,10 @@ To ignore a given file named `file.txt` you can add to your `.borgignore` file t
...
@@ -461,10 +466,10 @@ To ignore a given file named `file.txt` you can add to your `.borgignore` file t
- results/file.txt
- results/file.txt
```
```
Note that:
::: {.callout-note}
1. **you have to put a `results/` prefix in front of your files**.
1. **You have to put a `results/` prefix in front of your files**.
2. To exclude a file, the line must begin by `- `.
2. To exclude a file, the line must begin by `- `.
:::
To ignore every files named file.txt wherever they are, use the following syntax:
To ignore every files named file.txt wherever they are, use the following syntax:
...
@@ -498,7 +503,9 @@ This command is a wrapper of the borg delete command. If you need information ab
...
@@ -498,7 +503,9 @@ This command is a wrapper of the borg delete command. If you need information ab
This command can be used to delete specific archive directly by their name or by a prefix or a glob
This command can be used to delete specific archive directly by their name or by a prefix or a glob
Note that this command doesn't actually free disk space. You have to use `gblk compact` afterwards to achieve this
::: {.callout-important}
This command doesn't actually free disk space. You have to use `gblk compact` afterwards to achieve this
:::
## gblk delete usage
## gblk delete usage
...
@@ -523,7 +530,9 @@ This command is a wrapper of the `borg prune` command. Check [borg's documentati
...
@@ -523,7 +530,9 @@ This command is a wrapper of the `borg prune` command. Check [borg's documentati
This command can be used to keep archives created during a given period of time and remove others.
This command can be used to keep archives created during a given period of time and remove others.
Note that this command doesn't actually free disk space. You have to use `gblk compact` afterwards to achieve this.
::: {.callout-important}
This command doesn't actually free disk space. You have to use `gblk compact` afterwards to achieve this.
:::
## gblk prune usage
## gblk prune usage
...
@@ -767,7 +776,11 @@ To display remotes you can use the command:
...
@@ -767,7 +776,11 @@ To display remotes you can use the command:
gblk remote show
gblk remote show
```
```
It will display *locally* and *globally* defined remotes. Note that only unmasked `globally` remotes are displayed (e.g the global remotes that don't share a name with any local remotes).
It will display *locally* and *globally* defined remotes.
::: {.callout-note}
Only unmasked `globally` remotes are displayed (e.g the global remotes that don't share a name with any local remotes).
:::
Here is an example of what the commands can display:
Here is an example of what the commands can display: