31.03.2024 Views

Controlando_verso_es_com_Git_e_GitHub_Ca

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CasadoCódigo

Capítulo3. Trabalhandocomrepositóriolocal

Rastreandoecomitandomudançasdeumasóvez

Percebemos que havíamos esquecido de colocar o título na página

index.html. Vamosalteraroarquivo:

<!-- início do arquivo ... -->

<head>

<!-- tags meta e link ... -->

<title>Móveis Ecológicos</title>

</head>

<!-- restante do arquivo ... -->

Além disso, vamos diminuir o tamanho da página para ficar melhor

em dispositivos com telas pequenas. Para isso, alteraremos o arquivo

estilos.css:

body {

width: 50%;

margin: auto;

}

/* resto do css */

Seexecutarmos git status,teremos:

# On branch master

# Changes not staged for commit:

# (use "git add <file>..." to update what will be committed)

# (use "git checkout -- <file>..." to discard changes in

working directory)

#

# modified: estilos.css

# modified: index.html

#

no changes added to commit (use "git add" and/or

"git commit -a")

Note que os arquivos aparecem como modificados, mas a área de stage

aindanãocontémasmudançasefetuadas(Changesnotstagedforcommit).

Poderíamos efetuar o git add dessas mudanças seguido do git

commit. Porém, é possível rastrear as mudanças e comitá-las de uma vez

comaopção -a:

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!