-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git init flow says working tree contains unstaged changes, but it's not true #6401
Comments
try : |
Thx, but sadly still the same results: % git flow init -d
Fatal: Working tree contains unstaged changes. Aborting. |
Even with force: % git flow init -f -d
Fatal: Working tree contains unstaged changes. Aborting. |
check #81 |
thx, I already tried the suggestion in #81 before, and just tried them again, still no luck. % git reset --hard origin/master
HEAD is now at 5e30792
% git flow init -f
Fatal: Working tree contains unstaged changes. Aborting.
% gs
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
% git status
git add .
git status
git commit -m 'Commit typechanges'
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
% git flow init -f
Fatal: Working tree contains unstaged changes. Aborting. |
I finally got it to work, by making a new dir, repo and then pulling the remote git in. Maybe the problem is that I'm also using git-crypt? For example mkdir project-with-flow
cd project-with-flow
git init
git flow init
git remote add origin example.com/project.git
git pull
# do this for every branch
git branch --set-upstream-to=origin/master master |
Nice, Now it's ok? |
Yes, now everything seems to work. I only had it once again, with a |
Close this issue :D |
Ah damn, I just got it again, with |
I have the same problem. I'm just trying to do very simple and everyday tasks, then I added git and git-flow and now I can't use anything. |
I got same issue and I tried below command which worked for me
Refer: https://stackoverflow.com/questions/28251527/initializing-git-flow-in-existing-repository |
I'm a bit too late, but what I usually do is something along the lines of: Hope this helps anyone in the future :) |
Thanks @gongAll, that worked perfectly! A lot easier than resetting, and recreating the changes. To spell it out, these commands worked for me, after getting
|
Hi, there is always one where it did not work it out :)
I am also using git-crypt, but that does not show any problems. No stashes nowhere. |
Hi,
I can't
git init flow
in an existing repo, what can I do to fix this?There are no unstaged changes, it's a lie, I already did this:
The text was updated successfully, but these errors were encountered: