Search code examples
gitconfighost

Create post-receive file


i'm trying to configure my hostgator to use the git.

I has follow this steps

But in my .git/hooks folder, that's no one post-receive.

Just the files:

./                      post-update.sample*     prepare-commit-msg.sample*
../                     pre-applypatch.sample*  update.sample*
applypatch-msg.sample*  pre-commit.sample*
commit-msg.sample*      pre-rebase.sample*

How Can I create a post-receive file?

Tks


Solution

  • Although there isn't a sample post-receive hook, you can create one just by creating the file post-receive inside your .git/hooks directory. You can do that with any text editor, such as nano or vi (e.g. nano .git/hooks/post-receive).

    In order for the hook to work, you'd also need to set it executable, which you can do with chmod +x .git/hooks/post-receive.