Support for `pre-rebase` Hook
See original GitHub issueIs there a pre-commit hook that can prevent rebase operations? It looks like git does support a pre-rebase
hook, but I didn’t see it in the docs.
I checked here.
Example pre-rebase
hook:
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
githooks Documentation - Git
This hook is called by git-rebase[1] and can be used to prevent a branch from getting rebased. The hook may be called with...
Read more >Git Hooks | Atlassian Git Tutorial
Git Hooks are scripts that run automatically every time a particular event occurs in a Git repository. Learn what they do and how...
Read more >What git hooks apply to 'git rebase --continue'? - Stack Overflow
I idon't understand why the pre-commit hook isn't invoked? Surely a rebase (especially after a merge resolution!) is committing new code?
Read more >Support for the pre-rebase hook. (I04b346af) · Gerrit Code ...
Introduces support for the pre-rebase hook into JGit, along with the --no-verify rebase command option to bypass it. Also added unit tests.
Read more >Git Hooks | Learn how to use pre-commit hooks, post-commit ...
An introductory guide and resource for Git hooks. Learn how to use pre-commit hooks, post-commit hooks, post-receive hooks, and more.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
if you’re trying to hook into individual “commits” that (for example) an interactive rebase makes unfortunately I don’t think there’s a way to do that (
git rebase --continue
skips hooks in my experience)I just blogged about a solution to run hooks during rebase: