git tutorial
main
main
  • Introduction
  • Ferramentas de Controle de Versão
  • Git
  • Instalação
  • Configuração
  • Gerando chave ssh
  • Criando um novo projeto
  • Trabalhando em repositório existente
  • Adicionando arquivos
  • Visualizando área de staging
  • Removendo arquivos
  • Desfazendo mudanças
  • Ignorando arquivos
  • Registrando mudanças
  • Enviando mudanças
  • Recuperando mudanças
  • Incorporando mudanças
  • Resolvendo conflitos
  • Visualizando mudanças
  • Trabalhando com branches
  • Trabalhando com tags
  • Trabalhando com github
  • Modificando histórico
  • Exercicio
  • Referências
  • Cursos
  • Links úteis
Powered by GitBook
On this page
  • Visualiza diferença entre área de staging e área de trabalho
  • Exemplo
  • Visualiza diferença de conteúdo entre arquivos

Was this helpful?

Visualizando área de staging

Visualiza diferença entre área de staging e área de trabalho

git status
  • Comando usado para obter um resumo dos arquivos que foram modificados e que já estão na área de staging, prontos para serem inclusos no próximo commit.

Exemplo

On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    new file:   11_desfazendo_mudancas.md
    renamed:    11_registrando-mudancas.md -> 12_registrando-mudancas.md
    renamed:    12_visualizando-mudancas.md -> 18_visualizando-mudancas.md

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   08_visualizando-area-de-staging.md

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

Visualiza diferença de conteúdo entre arquivos

git diff [commit]
  • Comando usado para visualizar mudanças de arquivos entre commits e/ou área de staging

diff --git a/hello.txt b/hello.txt
index bf93fe6..6e3740d 100644
--- a/hello.txt
+++ b/hello.txt
@@ -1 +1,2 @@
-Oi!!!
\ No newline at end of file
+Oi!!!
+Tudo certo?
\ No newline at end of file
PreviousAdicionando arquivosNextRemovendo arquivos

Last updated 4 years ago

Was this helpful?