Git pull: "commit your changes or stash them before you merge" [Resolvido]

Publicado por Fábio Berbert de Paula em 27/05/2020

[ Hits: 15.696 ]

Blog: https://fabio.automatizando.dev

 


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

Outras dicas deste autor

Como reiniciar o USB sem tirar o cabo

Compartilhando arquivos entre computadores com Woof

Steam no Debian 10 Buster

Como checar se sua placa possui sinal físico de rede

Lançamento do TupiServer Linux 1.0

Leitura recomendada

Som no Flash + Firefox + Slackware

Cadê o lilo!?

Como reinstalar GRUB com live-CD do Ubuntu 9.04

Bloqueando Ultrasurf 9.8 com iptables

Exim - Removendo todas as mensagens da fila de espera (spool)

  

Comentários
[1] Comentário enviado por danniel-lara em 05/11/2020 - 10:58h


Bah , meu ajudou muito hoje aqui no trabalho
Valeu



Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts