Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error starting release: Working tree has untracked files

I'm using Maven JGit-Flow Plugin in order to automate some of the release process. Unfortunately I'm hitting this problem when trying to start new release using 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 

However I cannot see and untracked files here (nor on master):

git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean

Any idea how does Maven JGit-Flow Plugin find untracked files?

like image 275
Anton Belev Avatar asked Jul 28 '16 10:07

Anton Belev


2 Answers

A look into .git/jgitflow.log will show which files are found to be untracked by jgitflow. In my case I found the line:

GitHelper:         _  -- untracked: .DS_Store _

I have a global gitignore file

$ git config --get core.excludesfile
~/.gitignore_global

where .DS_Store is set as an exclusion. Unfortunately jgitflow seems not to be aware of this setting. So I added the exclusion to the project’s .gitignore file with:

 ### Mac OSX
.DS_Store

After that mvn jgitflow:release-start worked as expected.

like image 125
Pete Avatar answered Nov 15 '22 07:11

Pete


Fixed it by allowing untracked files:

            <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>
like image 35
Anton Belev Avatar answered Nov 15 '22 08:11

Anton Belev