1 Answer

0 votes
by
Git hooks are certain scripts that Git runs before or after an event like commit, push, update or receive. You will find the ‘hooks’ folder inside .git directory in your local repository. You will find the build-in scripts here pre-commit, post-commit, pre-push, post push. These scripts get executed locally before or after the occurrence of an event. You can also modify these scripts according to your needs and Git will execute the script when that particular event occurs.

Related questions

0 votes
    Explain about the lifecycle hooks in Angular? Explain a few lifecycle hooks...
asked Jun 30, 2021 in Technology by JackTerrance
0 votes
0 votes
    What do understand by the hooks in Cucumber?...
asked Jul 20, 2021 in Education by JackTerrance
0 votes
    git reflog tracks the commits that are made and the commits that are discarded. A. True B. False...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    What is git cherry-pick? What are the scenarios in which git cherry-pick can be used?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    What are the advantages of using GIT?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    Git, Mercurial and Subversion are centralized version control tools. (i)False (ii)True...
asked Oct 5, 2020 in Technology by Editorial Staff
0 votes
    What is the Git command to move branch pointer to different commit without checkout? A. Git cherrypick B. Git update-ref C. Git reset head...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    git reflog –verbose will print extra information on the screen. A. True B. False...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    git bisect is used to identify a commit that has introduced a bug. A. True B. False...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    Which command helps you track the revisions of your revisions in Git? A. Git reflog B. Git logref C. Git track D. Git revision trak...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    What does the command git reset –hard HEAD ~3 do? A. Merges the last 3 commits to the master B. Discards ... nothing D. Resets the head to 3 commits before the current commit...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the Git command to view the last three commits in a line? A. git last 3 commits B. git log -–oneline -3 C. git show log -3 D. git log...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the significance of using –index in the git stash pop – – index command? A. To commit the ... To index the files staged D. To pull the staged changes...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    A tag in Git context is a ______. A. Keyword B. Reference to a specific commit C. Search String...
asked Dec 23, 2022 in Technology by JackTerrance
...