繁体   English   中英

github存储库作为git模板目录

[英]github repository as a git template directory

所以根据我的理解,有可能通过git init --template=<template_dir>git clone <repository> --template=<template_dir>初始化或克隆git存储库, git init --template=<template_dir>复制该给定文件夹中的所有内容。 git文件夹,对钩子等很有用。

所以我想知道,有没有可能提供github存储库作为template_dir 原因是,我想为多个项目/团队成员设置git钩子作为自动和未来的证据。 我现在这样做的方法是在rep和symlink中手动创建一个git_hooks文件夹,但我正在寻找一种方法来删除这个额外的步骤并将其自动化一点。

我刚刚在我的公司设置了一个git-template存储库。 到目前为止,它只在钩子目录中有一个prepare-commit-msg钩子,它在分支名称(在我们的例子中是跟踪器号码)前面提交消息。 常见的工作流程是首先克隆git-template repo,或者提取任何最近的更改,然后使用--template选项git init重新初始化每个开发人员的本地存储库。 到目前为止,它受到了好评。

不,似乎不可能:

0c0ead(git 1。6。2,2009年2月)这样的提交只提到了本地路径。

Makefile:修复相对路径名的错误检测

安装规则想要区分作为绝对路径给出的template_dir (例如/usr/share/git-core/templates )和相对的路径(例如share/git-core/templates

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM