Hola,
No puedo git init flow
en un repositorio existente, ¿qué puedo hacer para solucionar esto?
No hay cambios no preparados, es mentira, ya hice esto:
% git flow init
Fatal: Working tree contains unstaged changes. Aborting.
% git reset --hard
HEAD is now at 5e30792
% gs
On branch feature-xyz
Your branch is ahead of 'origin/feature-xyz' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
% git flow init
Fatal: Working tree contains unstaged changes. Aborting.
tratar :
git commit -m "ETIQUETA"
git empujar --todos
git flujo de inicio -d
Thx, pero lamentablemente siguen siendo los mismos resultados:
% git flow init -d
Fatal: Working tree contains unstaged changes. Aborting.
Incluso con fuerza:
% git flow init -f -d
Fatal: Working tree contains unstaged changes. Aborting.
cheque #81
Gracias, ya probé la sugerencia en el n. ° 81 antes, y solo los intenté nuevamente, todavía sin suerte.
% 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.
Finalmente conseguí que funcionara, creando un nuevo directorio, un repositorio y luego activando el git remoto. ¿Quizás el problema es que también estoy usando git-crypt?
Por ejemplo
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
Bien, ¿ahora está bien?
Sí, ahora todo parece funcionar. Solo lo tuve una vez más, con un comando git flow feature
, pero no recuerdo cuál. Tal vez publish
. Acabo de hacer git push -u --all
entonces.
Cierra este tema :D
Maldita sea, lo acabo de recibir de nuevo, con git flow feature finish
, ahora sospecho que tiene algo que ver con el uso git crypt
. voy a cerrar este tema
Tengo el mismo problema. Solo estoy tratando de hacer tareas muy simples y cotidianas, luego agregué git y git-flow y ahora no puedo usar nada.
Recibí el mismo problema y probé el siguiente comando que funcionó para mí
git reset --hard
Consulte: https://stackoverflow.com/questions/28251527/initializing-git-flow-in-existing-repository
Llego un poco tarde, pero lo que suelo hacer es algo como:
git stash && git flow <command> && git stash pop
Espero que esto ayude a alguien en el futuro :)
Gracias @gongAll , ¡funcionó perfectamente! Mucho más fácil que restablecer y recrear los cambios. Para explicarlo, estos comandos me funcionaron después de obtener Fatal: Working tree contains unstaged changes. Aborting.
:
git stash
git flow init
git flow feature start my-new-flow-feature-branch
git stash pop
Comentario más útil
Recibí el mismo problema y probé el siguiente comando que funcionó para mí
Consulte: https://stackoverflow.com/questions/28251527/initializing-git-flow-in-existing-repository