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

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

[ Hits: 14.335 ]

Blog: https://mestrefabio.com

 


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

Erro: "Possible missing firmware... for module r8169" [Resolvido]

Capturando os últimos artigos do VivaoLinux

MellowPlayer - Ouça Spotify, Deezer, Google Play, Tune In dentre outros

Como mapear teclas no Vim

Configurando um drive de CD-RW com interface IDE

Leitura recomendada

Skype + Webcam usando X11 no lugar do XV com o Driver SIS 671 em Debian/Ubuntu

Roadmap.sh: o que eu preciso estudar para me tornar um bom desenvolvedor?

Kernel Panic: VFS: Unable to mount root

Bootchart: Monitorando o boot do sistema Linux

Como Remover CTRL-M (^M) de arquivos

  

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