This is an old revision of the document!


Basic operation of creating a new repo or enhancing an existing repo with git init.

.
├── branches
├── config
├── description
├── HEAD
├── 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
├── objects
│   ├── info
│   └── pack
└── refs
    ├── heads
    └── tags
Running git init in an existing repository is safe. It will not
overwrite things that are already there. The primary reason for
rerunning git init is to pick up newly added templates (or to
move the repository to another place if --separate-git-dir is
given).

By default, git init will populate your new .git directory with the contents of /usr/share/git-core/templates/, without overwriting existing content of the same name:

├── 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
  • git_init.1527683151.txt.gz
  • Last modified: 2018/05/30 12:25
  • by rpjday