Last active
May 26, 2020 19:24
-
-
Save porcelli/23f573c2f49454a4015f710f44d12a58 to your computer and use it in GitHub Desktop.
Code for blog post: How to setup post-commit hooks on Business Central
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir myrepo | |
$ cd myrepo | |
$ git init | |
Initialized empty Git repository in /Users/porcelli/blog/myrepo/.git/ | |
$ touch file1.txt | |
$ git add . | |
$ git commit -m "first commit" | |
[master (root-commit) 0fa1a4a] first commit | |
1 file changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 file1.txt | |
$ cd .git/hooks/ // <1> | |
$ echo "#\!/bin/bash\necho Hello World" > post-commit // <2> | |
$ chmod 755 post-commit // <3> | |
$ cd ../.. | |
$ touch file2.txt | |
$ git add . | |
$ git commit -m "second commit" | |
Hello World // <4> | |
[master 3208647] second commit | |
1 file changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 file2.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment