简体   繁体   中英

where is the location of client side git hooks in server

I want to deploy my own version of git client side hooks. for this, i need to know whether the client side hooks are generated from the clients system or are also cloned from the server. If it is cloned from the server, what is the location where the client side hooks are located?

The hooks location is under .git folder in your cloned folder

.git
├── branches
├── COMMIT_EDITMSG
├── config
├── description
├── HEAD
├── hooks
├── index
├── info
├── logs
├── objects
└── refs

there is a folder hooks , where you can find post , pre hooks.

├── applypatch-msg.sample
├── commit-msg.sample
├── post-update.sample
├── pre-applypatch.sample
├── pre-commit.sample
├── prepare-commit-msg.sample
├── pre-push.sample
├── pre-rebase.sample
└── update.sample

rename .sample files to like post-update.sample to post-update to run pre , post hooks.

The client side hooks are not stored in server. Server has nothing to do with client side hooks in git. ie client side hooks and server side hooks are not inter-related. However, they are generated inside your local repository by your own local system.
In short, client side git hooks are not related to server and aren't stored there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM