Fix some formatting in README.md.
This commit is contained in:
parent
15e3e0dc6f
commit
5b4782a61c
1 changed files with 10 additions and 10 deletions
12
README.md
12
README.md
|
|
@ -6,7 +6,7 @@ files configured for attribute store/restore.
|
||||||
This hook can be used in place of programs such as **etckeeper** to automatically (once set up) record and restore the attributes for files in your `/etc`
|
This hook can be used in place of programs such as **etckeeper** to automatically (once set up) record and restore the attributes for files in your `/etc`
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
I prefer this script over `etckeeper` as, once set up correctly, it is far simpler and completely automated - you do not need to run a command every time
|
I prefer this script over **etckeeper** as, once set up correctly, it is far simpler and completely automated - you do not need to run a command every time
|
||||||
you commit or pull changes to your `/etc` git repository.
|
you commit or pull changes to your `/etc` git repository.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ And add the `gitattributesdb` repository as a submodule inside the `.githooks/`
|
||||||
git submodule add https://github.com/tadgy/gitattributesdb.git .githooks/gitattributesdb
|
git submodule add https://github.com/tadgy/gitattributesdb.git .githooks/gitattributesdb
|
||||||
```
|
```
|
||||||
|
|
||||||
Oncw the `gitattributesdb` submodule is cloned, git hook scripts need to be added.
|
Once the `gitattributesdb` submodule is cloned, git hook scripts need to be added.
|
||||||
|
|
||||||
You may already have hooks stored in the `.git/hooks/` directory - these will need to be moved into the `.githooks/` directory.
|
You may already have hooks stored in the `.git/hooks/` directory - these will need to be moved into the `.githooks/` directory.
|
||||||
This command is only required if you already have hooks in your local copy of the repository:
|
This command is only required if you already have hooks in your local copy of the repository:
|
||||||
|
|
@ -59,7 +59,7 @@ each file:
|
||||||
```
|
```
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Store/restore the attributes of files in the repository:
|
# Store/restore the attributes of files:
|
||||||
.githooks/gitattributesdb/gitattributsdb "${0##*/}"
|
.githooks/gitattributesdb/gitattributsdb "${0##*/}"
|
||||||
```
|
```
|
||||||
Save the changes to each file.
|
Save the changes to each file.
|
||||||
|
|
@ -93,8 +93,8 @@ git submodule update --init
|
||||||
git config --local core.hooksPath .githooks
|
git config --local core.hooksPath .githooks
|
||||||
```
|
```
|
||||||
|
|
||||||
This will clone the **exact** commit of `gitattributesdb` that was originally added to the repository - it does not track the branch itself, so changes at the
|
This will clone the **exact** commit of `gitattributesdb` that was originally added to the repository - it does not track the branch itself, so changes at
|
||||||
HEAD of the branch are not reflected in the clone. In order to get the latest changes, use the update procedure detailed below.
|
the `HEAD` of the branch are not reflected in the clone. In order to get the latest changes, use the update procedure detailed below.
|
||||||
|
|
||||||
Once these commands have been run in the newly cloned repository (that has been initialised by the above procedure), everything is set for
|
Once these commands have been run in the newly cloned repository (that has been initialised by the above procedure), everything is set for
|
||||||
`gitattributesdb` to maintain the attributes for files.
|
`gitattributesdb` to maintain the attributes for files.
|
||||||
|
|
@ -107,7 +107,7 @@ This allows you to pick up any fixes or updates to the tree.
|
||||||
|
|
||||||
To update the submodule **from the root of the git repository**, use:
|
To update the submodule **from the root of the git repository**, use:
|
||||||
```
|
```
|
||||||
(cd .githooks/gitatrributesdb && git fetch && git merge origin/master)
|
(cd .githooks/gitatrributesdb/ && git fetch && git merge origin/master)
|
||||||
```
|
```
|
||||||
|
|
||||||
The submodule will now have been updated to track the latest changes in the remote "master" branch.
|
The submodule will now have been updated to track the latest changes in the remote "master" branch.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue