我正在尝试为git创建一个预提交钩子,它编辑我每个.h和.m文件顶部的注释.我想更改x-code添加的标题注释,以包含应用版本和许可证信息.更改为新版本时,这将非常有用.
这是我在x-code中创建文件时自动插入的文本:
//
// myFile.h
// myApp
//
// Created by Developer on 11/13/12.
// Copyright (c) 2012 myCompany LLC. All rights reserved.
//
Run Code Online (Sandbox Code Playgroud)
我想钩子把它改成这个:
/*
myFile.h
myApp
Version: 1.0
myApp is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 2 of the License, or (at your option) any later version.
myApp is distributed in the hope that it will be …Run Code Online (Sandbox Code Playgroud)