Ant*_*lev 5 maven jgitflow-maven-plugin
我正在使用Maven JGit-Flow插件来自动化一些发布过程。不幸的是,当我尝试使用mvn jgitflow:release-start以下命令启动新版本时遇到了这个问题:
[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5.1:release-start (default-cli) on project <myProjectName>: Error starting release: Error starting release: Working tree has untracked files
Run Code Online (Sandbox Code Playgroud)
但是我在这里(在主服务器上)也看不到和未跟踪的文件:
git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)
知道Maven JGit-Flow插件如何查找未跟踪的文件吗?
查看.git/jgitflow.log将显示发现哪些文件未被 jgitflow 跟踪。在我的情况下,我发现了这一行:
GitHelper: _ -- untracked: .DS_Store _
Run Code Online (Sandbox Code Playgroud)
我有一个全局 gitignore 文件
$ git config --get core.excludesfile
~/.gitignore_global
Run Code Online (Sandbox Code Playgroud)
where.DS_Store设置为排除项。不幸的是 jgitflow 似乎不知道这个设置。因此,我将排除项添加到项目.gitignore文件中:
### Mac OSX
.DS_Store
Run Code Online (Sandbox Code Playgroud)
之后mvn jgitflow:release-start按预期工作。
通过允许未跟踪的文件来修复它:
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m5.1</version>
<configuration>
<pushReleases>true</pushReleases>
<allowUntracked>true</allowUntracked>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5088 次 |
| 最近记录: |