This commit is contained in:
parent
ae741d1ced
commit
0b59b7e44c
1 changed files with 17 additions and 2 deletions
|
@ -3,7 +3,7 @@ obj: application
|
|||
wiki: https://en.wikipedia.org/wiki/Git
|
||||
repo: https://github.com/git/git
|
||||
website: https://git-scm.com
|
||||
rev: 2024-04-15
|
||||
rev: 2024-12-04
|
||||
---
|
||||
|
||||
# Git
|
||||
|
@ -286,4 +286,19 @@ git am --abort < patch
|
|||
|
||||
## .gitignore
|
||||
A `.gitignore` file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected.
|
||||
This file contains pattern on each line which exclude files from git versioning.
|
||||
This file contains pattern on each line which exclude files from git versioning.
|
||||
|
||||
## Git Hooks
|
||||
Git hooks are custom scripts that run automatically in response to certain Git events or actions. These hooks are useful for automating tasks like code quality checks, running tests, enforcing commit message conventions, and more. Git hooks can be executed at different points in the Git workflow, such as before or after a commit, push, or merge.
|
||||
|
||||
Git hooks are stored in the `.git/hooks` directory of your repository. By default, this directory contains example scripts with the `.sample` extension. You can customize these scripts by removing the `.sample` extension and editing them as needed.
|
||||
|
||||
Hooks only apply to your local repository. If a hook script fails it prevents the associated action as well.
|
||||
|
||||
### Common Git Hooks
|
||||
- pre-commit
|
||||
- prepare-commit-msg
|
||||
- commit-msg
|
||||
- post-commit
|
||||
- post-checkout
|
||||
- pre-rebase
|
||||
|
|
Loading…
Reference in a new issue