git flow start/finish reports unstaged changes when there are none to commit or push #81

Open
devlins opened this Issue Nov 23, 2010 · 20 comments

Comments

Projects
None yet
@devlins

devlins commented Nov 23, 2010

Sometimes when performing git flow start or finish, git flow will report:

fatal: Working tree contains unstaged changes. Aborting.

There is however nothing to commit and nothing to pull or push to/from the remote. The working copy is up to date.

I have had to work around this issue by creating false commits of changes to a "readme.txt" file in order to perform these steps, but this is tedious. Is there another command that I can use to see what is blocking the git flow start/finish command?

@nvie

This comment has been minimized.

Show comment Hide comment
@nvie

nvie Nov 26, 2010

Owner

Please provide a replay of your commands that lead to this issue. That would definitely make it easier to analyse what causes this issue. Try to keep it as short as possible.

Owner

nvie commented Nov 26, 2010

Please provide a replay of your commands that lead to this issue. That would definitely make it easier to analyse what causes this issue. Try to keep it as short as possible.

@albohlabs

This comment has been minimized.

Show comment Hide comment
@albohlabs

albohlabs Aug 22, 2011

This could happen when you delete files and won't commit. Check the staged files with git diff --cached and commit.

This could happen when you delete files and won't commit. Check the staged files with git diff --cached and commit.

@vinitkumar

This comment has been minimized.

Show comment Hide comment
@vinitkumar

vinitkumar Nov 8, 2012

There is not output with git diff --cached . Any idea, how to resolve the issue?

There is not output with git diff --cached . Any idea, how to resolve the issue?

@bekas

This comment has been minimized.

Show comment Hide comment
@bekas

bekas Dec 1, 2012

i have a same problem. Do you find any decision?

bekas commented Dec 1, 2012

i have a same problem. Do you find any decision?

@vinitkumar

This comment has been minimized.

Show comment Hide comment
@vinitkumar

vinitkumar Dec 1, 2012

The easiest solution is to commit the changes ,delete the repo and re clone it.

The easiest solution is to commit the changes ,delete the repo and re clone it.

@bekas

This comment has been minimized.

Show comment Hide comment
@bekas

bekas Dec 2, 2012

thanks a lot

bekas commented Dec 2, 2012

thanks a lot

@norbertas-gaulia

This comment has been minimized.

Show comment Hide comment
@norbertas-gaulia

norbertas-gaulia Jan 19, 2013

Most of the time bug is hapening with eGit on Eclipse based ide's, when i use git bash or tortoise git this error does not appear

Most of the time bug is hapening with eGit on Eclipse based ide's, when i use git bash or tortoise git this error does not appear

@rubyrider

This comment has been minimized.

Show comment Hide comment
@rubyrider

rubyrider May 10, 2013

git reset --hard origin/master can save your life!

git reset --hard origin/master can save your life!

@georgezlatev

This comment has been minimized.

Show comment Hide comment
@georgezlatev

georgezlatev May 18, 2013

It is very strange however executing:
git status
and repeating the command works as a fix in my environment.:-)

It is very strange however executing:
git status
and repeating the command works as a fix in my environment.:-)

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Aug 26, 2014

we are having the same effect like @georgezlatev working on MAC OS X with intellij Idea 13. Seems that git-flow does not register a commit in a timely fashion ;-)

Will this be fixed?

ghost commented Aug 26, 2014

we are having the same effect like @georgezlatev working on MAC OS X with intellij Idea 13. Seems that git-flow does not register a commit in a timely fashion ;-)

Will this be fixed?

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Oct 21, 2014

I only get this error when trying to git flow finish from a subdirectory. It works from the repos root directory.
Cheers guys

ghost commented Oct 21, 2014

I only get this error when trying to git flow finish from a subdirectory. It works from the repos root directory.
Cheers guys

@WillettLuke

This comment has been minimized.

Show comment Hide comment
@WillettLuke

WillettLuke Jan 12, 2015

Appreciate this thread is old but i'm sure others will still be getting this error and will find this thread. I am using SourceTree and was getting this error. I managed to fix this by right clicking on my feature branch and then merging into develop/origin. I was than able to push my committed changes and delete the feature branch.

Appreciate this thread is old but i'm sure others will still be getting this error and will find this thread. I am using SourceTree and was getting this error. I managed to fix this by right clicking on my feature branch and then merging into develop/origin. I was than able to push my committed changes and delete the feature branch.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jan 12, 2015

best Option would be if the scripts execute a git status before trying to finish a feature:

if output=$(git status --porcelain) && [ -z "$output" ]; then

finish

else

normal error

fi

ghost commented Jan 12, 2015

best Option would be if the scripts execute a git status before trying to finish a feature:

if output=$(git status --porcelain) && [ -z "$output" ]; then

finish

else

normal error

fi

@fspreng

This comment has been minimized.

Show comment Hide comment
@fspreng

fspreng Jan 13, 2015

Is this also an issue when finishing a release/hotfix branch?

fspreng commented Jan 13, 2015

Is this also an issue when finishing a release/hotfix branch?

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jan 13, 2015

yes. with Intellj-Gitflow Plugin and in Bash.
when i run a 'git status' in bash and finish feature/release/hotfix it works.

ghost commented Jan 13, 2015

yes. with Intellj-Gitflow Plugin and in Bash.
when i run a 'git status' in bash and finish feature/release/hotfix it works.

@DonnaLea

This comment has been minimized.

Show comment Hide comment
@DonnaLea

DonnaLea Apr 14, 2015

In SourceTree I was getting this error (I was trying to finish a current feature) when SourceTree showed there were no changes. It wasn't until I switched to the Terminal and did a git status it showed a typechange to a file that hadn't been committed (because it didn't show in SourceTree). The changes I had made in the project was a replacement of two .framework files, so a lot of internal changes to those .framework files occurred by the looks of it. Ultimately the error from SourceTree was in fact correct, but I'm disappointed that SourceTree could not show me this change that was stopping me from finishing my feature branch :(

In SourceTree I was getting this error (I was trying to finish a current feature) when SourceTree showed there were no changes. It wasn't until I switched to the Terminal and did a git status it showed a typechange to a file that hadn't been committed (because it didn't show in SourceTree). The changes I had made in the project was a replacement of two .framework files, so a lot of internal changes to those .framework files occurred by the looks of it. Ultimately the error from SourceTree was in fact correct, but I'm disappointed that SourceTree could not show me this change that was stopping me from finishing my feature branch :(

@dragGH102

This comment has been minimized.

Show comment Hide comment
@dragGH102

dragGH102 Oct 20, 2015

I confirm git status for me helps to see what the unstages changes are

I confirm git status for me helps to see what the unstages changes are

@bedrin

This comment has been minimized.

Show comment Hide comment
@bedrin

bedrin Dec 6, 2015

git reset --hard works for me in such cases

bedrin commented Dec 6, 2015

git reset --hard works for me in such cases

@srajaiah

This comment has been minimized.

Show comment Hide comment
@srajaiah

srajaiah May 29, 2016

git reset --hard worked for me as git status did not display any uncommitted changes.

git reset --hard worked for me as git status did not display any uncommitted changes.

@Lapinou42

This comment has been minimized.

Show comment Hide comment
@Lapinou42

Lapinou42 Jun 30, 2016

Just do these commands in your terminal:

git status
git add .
git status
git commit -m 'Commit typechanges'

It works well for me ;)

Just do these commands in your terminal:

git status
git add .
git status
git commit -m 'Commit typechanges'

It works well for me ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment