Skip to content

Global post-checkout hook to automatically set local user configuration of a repo, when cloning from a specific host

License

Notifications You must be signed in to change notification settings

MacKenzie779/git-postcheckout-hook-userconf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Global post-checkout hook to automatically set local user configuration of a repo, when cloning from a specific host

  1. Enable Git hooks globally:

    git config --global init.templatedir '~/.git-templates'
  2. Create the post-checkout hook

    mkdir -p ~/.git-templates/hooks
    cp post-checkout ~/.git-templates/hooks/post-checkout
    chmod +x ~/.git-templates/hooks/post-checkout
  3. Edit the hook-file to insert your credentials and specific host

    vim ~/.git-templates/hooks/post-checkout

About

Global post-checkout hook to automatically set local user configuration of a repo, when cloning from a specific host

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages