The result of many web searches is that the pre-checkout hook in git is not yet implemented. The reason may be:
- There is no practical application. I have a case
- This can be achieved in any other way. Please tell me how?
- Too hard to implement. I do not think this is the real reason.
Here is my problem:
I used pre-commit , post-merge and post-checkout hooks to support a different database for each branch.
Scenario : now when I pre-commit backup of the database, it is saved to the file using the pre-commit hook. And when I check the branch or merge, the database stored in the file is restored using post-merge and post-checkout interceptors. Now the situation is that if someone makes changes to the database after committing and checking, the changes are lost because the database was not copied. The check was successful, since there were no changes in the file structure.
So, in this case, I want to use pre-checkout to handle the database backup task in the above scenario.
source share