Git pull: "commit your changes or stash them before you merge" [Resolvido]
Dica publicada em Linux / Avançado
Git pull: "commit your changes or stash them before you merge" [Resolvido]
Problema
Você está trabalhando em um repositório local, mudou alguns arquivos, mas o repositório remoto possui alterações nos mesmos arquivos.Ao executar um "git pull" você recebe a seguinte mensagem de erro:
error: Your local changes to the following files would be overwritten by merge
.
.
.
Please commit your changes or stash them before you merge.
Aborting
Solução
Utilizar um "git stash" para gravar o estado atual do seu repositório local, revertendo os arquivos para o estado atual do repositório remoto.Execute:
git stash push --include-untracked
E agora sim o pull irá funcionar:
git pull
Bah , meu ajudou muito hoje aqui no trabalho
Valeu