change ``bash headers to
``sh
This commit is contained in:
@@ -5,7 +5,7 @@ tags: [ "data", "git" ]
|
||||
|
||||
Check out the sample hooks:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
cd $GIT_REPO
|
||||
ls .git/hooks
|
||||
head .git/hooks/pre-commit.sample
|
||||
@@ -13,7 +13,7 @@ head .git/hooks/pre-commit.sample
|
||||
|
||||
Add a hook to check the shell scripts in `$GIT_REPO` before making a commit:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
echo '#!/bin/sh
|
||||
shellcheck *.sh' > .git/hooks/commit-msg
|
||||
chmod u+x .git/hooks/commit-msg
|
||||
|
@@ -10,7 +10,7 @@ The first should be its own repository, but should also retain its own history.
|
||||
|
||||
First, we extract its history as an independent item, and make that into a seprate branch.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
git subtree split --prefix=sub-1 -b sub
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ If you want something a few directories deep, you can use `--prefix=sub-1/dir-2/
|
||||
|
||||
Then go and create a new git somewhere else:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
cd ..;mkdir sub-1;cd sub-1;git init --bare
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ git push ../subtest sub:master
|
||||
|
||||
Finally, you can clone this repo from your original.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
git clone ../subtest
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user