Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过ANT脚本创建git分支/标记_Git_Ant_Git Branch - Fatal编程技术网

通过ANT脚本创建git分支/标记

通过ANT脚本创建git分支/标记,git,ant,git-branch,Git,Ant,Git Branch,我正在使用ANT脚本构建版本为的jar文件。是否有机会在ANT脚本的git存储库中创建标记/分支?您可以在ANT中用于常见的git任务 这包括创建分支: <git:git directory="repositoryCloneFolder" verbose="true" settingsRef="git.testing"> <git:clone uri="https://github.com/rimerosolutions/playground-repo.git"/>

我正在使用ANT脚本构建版本为的jar文件。是否有机会在ANT脚本的git存储库中创建标记/分支?

您可以在ANT中用于常见的git任务

这包括创建分支:

<git:git directory="repositoryCloneFolder" verbose="true" settingsRef="git.testing">
 <git:clone uri="https://github.com/rimerosolutions/playground-repo.git"/>
 <git:checkout branchName="dummyBranch" createBranch="true"/>
</git:git>

或:



是否为我提交、标记、向右推?我想提交,而不是创建jar文件并标记提交,之后我希望所有文件都与远程分支同步。@user2071938您通常不会在git repo中提交和标记二进制文件,而只提交源文件。当然,我的ant文件到目前为止创建了可执行的jar文件,包括所有依赖的库,这个ant文件创建了一个文件“myapp-1.5.0.jar”,现在我想要一个到我的源代码的连接,所以我想用“v1.5.0”标记当前提交,只要jar本身没有提交,您就可以标记提交索引只有在进行更改时才提交吗?如果我运行当前ant文件5次,就会得到5次提交。
<git:git directory="${testLocalRepo}" verbose="true">
 <git:tag name="${dummy.tag.name}"/>
</git:git>