0

Clonei o ramo de um projeto, ao concluir surgiu alguns arquivos não acompanhados pelo git e alguns com alterações.

Exemplos:

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    "index.htm"
        deleted:    "img/del/mix.jpg"

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        "front/sobre.html"
        "back/login.jsp"

Fiz algumas tentativas sem sucesso para cancelar.

git checkout --

error: pathspec 'index.htm' did not match any file(s) known to git.

git co -f

Already on 'ramo' Your branch is up to date with 'origin/ramo'.

git reset --hard HEAD~1

Checking out files: 100% (58/58), done. HEAD is now at abcd123 Merge

branch 'master' of https://gitlab.com/projeto

into ramo

Obs: Manteve as alterações.

1 Resposta 1

0

Se você quer desfazer essas mudanças faça o seguinte:

git checkout index.htm img/del/mix.jpg

vai "restaurar" esses dois arquivos, ou seja vai ficar igual quando você clonou o repo

Os arquivos:

    "front/sobre.html"
    "back/login.jsp"

Pode deletar manualmente, pois são arquivos que não estão sendo gerenciados pelo git

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .