How to work with git

Issue #531

Expand commits in Sublime Merge

1
2
3
4
{
"expand_merge_commits_by_default": true,
"translate_tabs_to_spaces": true
}

local hooks .git/hooks vs hooksPath

1
git config core.hooksPath ~/.git-templates/hooks

Only hooksPath gets run. Removing hooksPath make local hooks work

https://stackoverflow.com/questions/39332407/git-hooks-applying-git-config-core-hookspath

Use git templates

https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook

Define alias in zshrc

1
2
3
vim ~/.zshrc
alias check="~/.git-templates/hooks/check.sh"
source ~/.zshrc

pre-commit

https://itnext.io/using-git-hooks-to-enforce-branch-naming-policy-ffd81fa01e5e

1
(feature|fix|refactor)\/[a-z0-9-]+$

Comments