]> git.madduck.net Git - etc/vcsh.git/blob - .config/vcsh/hooks-available/post-init.write-gitignore

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

ignore .bak gitignore.d files
[etc/vcsh.git] / .config / vcsh / hooks-available / post-init.write-gitignore
1 #!/bin/sh
2
3 # only run during an actual init (not when init is called as part of e.g.
4 # clone).
5 [ $VCSH_COMMAND = init ] || exit 0
6
7 cd $GIT_WORK_TREE
8
9 GIT_IGNORE_FILE=.gitignore.d/$VCSH_REPO_NAME
10
11 touch $GIT_IGNORE_FILE
12 git add -f $GIT_IGNORE_FILE
13 vcsh write-gitignore $VCSH_REPO_NAME
14 git add $GIT_IGNORE_FILE
15 git commit -m'seed gitignore file'