Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| git_init [2018/05/30 12:15] – created rpjday | git_init [2019/02/21 12:57] (current) – [Overview (not quite done here)] rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Overview ===== | + | ===== Overview |
| - | Basic operation of creating | + | Basic and advanced features for initializing |
| + | |||
| + | ===== Working with the template directory ===== | ||
| + | |||
| + | By default, '' | ||
| + | |||
| + | If you don't specify a template directory, the default used is ''/ | ||
| + | |||
| + | < | ||
| + | . | ||
| + | ├── branches/ | ||
| + | ├── description | ||
| + | ├── hooks/ | ||
| + | │ ├── applypatch-msg.sample* | ||
| + | │ ├── commit-msg.sample* | ||
| + | │ ├── fsmonitor-watchman.sample* | ||
| + | │ ├── post-update.sample* | ||
| + | │ ├── pre-applypatch.sample* | ||
| + | │ ├── pre-commit.sample* | ||
| + | │ ├── prepare-commit-msg.sample* | ||
| + | │ ├── pre-push.sample* | ||
| + | │ ├── pre-rebase.sample* | ||
| + | │ ├── pre-receive.sample* | ||
| + | │ └── update.sample* | ||
| + | └── info/ | ||
| + | └── exclude | ||
| + | </ | ||
| + | |||
| + | Rather than accepting the default directory and content, it's common for developers to want to immediately register their own hooks, which means setting up an alternate template directory. | ||
| + | |||
| + | From the man page for "git init'': | ||
| + | |||
| + | < | ||
| + | TEMPLATE DIRECTORY | ||
| + | Files and directories in the template directory whose name do | ||
| + | not start with a dot will be copied to the $GIT_DIR after it is | ||
| + | | ||
| + | |||
| + | The template directory will be one of the following (in order): | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | / | ||
| + | |||
| + | The default template directory includes some directory | ||
| + | | ||
| + | | ||
| + | |||
| + | The sample hooks are all disabled by default, To enable one of | ||
| + | the sample hooks rename it by removing its .sample suffix. | ||
| + | </ | ||