开始发布时出错:工作树中有未跟踪的文件

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插件如何查找未跟踪的文件吗?

Pet*_*ete 7

查看.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按预期工作。

  • 我不确定你的意思。为什么 git 应该抱怨?我的问题是 jgitflow 抱怨一个 untacked .DS_Store 文件,但我无法通过 `git status` 看到任何未跟踪的内容。 (2认同)

Ant*_*lev 4

通过允许未跟踪的文件来修复它:

            <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)