Post-checkout
suggest changeThis hook works similarly to the post-commit
hook, but it’s called whenever you successfully check out a reference with git checkout
. This could be a useful tool for clearing out your working directory of auto-generated files that would otherwise cause confusion.
This hook accepts three parameters:
- the ref of the previous HEAD,
- the ref of the new HEAD, and
- a flag indicating if it was a branch checkout or a file checkout (
1
or0
, respectively).
Its exit status has no affect on the git checkout
command.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents