- Save files to
~/.git/hooks/
- Make them executable:
chmod +x ~/.git/hooks/pre-{commit,push}
- Configure git to use these hooks:
git config --global core.hooksPath ~/.git/hooks
To run the script please follow these instructions:
- Launch Terminal (
CMD+Space
=> digit “Terminal” => pressEnter
) - copy and paste inside the terminal and press enter:
curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
- copy and paste inside the terminal and press
Enter
:sudo bash ./zoomus_vaccine.sh
- It will ask you for your mac account password
- Insert
1
and pressEnter
This file contains 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
[alias] | |
# ronto stands for "rebase --onto". Uses the current branch to move it and updates the start-of-the-branch tag along | |
ronto = "!f() { \ | |
git rebase --onto $1 __start__$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --abbrev-ref HEAD); \ | |
git tag -d __start__$(git rev-parse --abbrev-ref HEAD); \ | |
git tag __start__$(git rev-parse --abbrev-ref HEAD) $1; \ | |
}; f" | |
# nb stands for "create branch". Creates a tag marking the start-of-the-branch | |
cb = "!f() { \ | |
git tag __start__$1; \ |
This file contains 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
#!/bin/sh | |
# https://github.com/shyiko/ktlint pre-commit hook | |
git diff --name-only --cached --relative | grep '\.kt[s"]\?$' | xargs ktlint -F --relative . | |
if [ $? -ne 0 ]; then exit 1; else git add .; fi |