git para não manjadores
TRANSCRIPT
![Page 1: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/1.jpg)
$ Git para não manjadoresDesmistificando o controle de versão
![Page 2: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/2.jpg)
![Page 3: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/3.jpg)
O que é Controle de Versão?
![Page 4: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/4.jpg)
Por que versionar?
![Page 5: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/5.jpg)
ColaboraçãoPor que versionar?
![Page 6: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/6.jpg)
![Page 7: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/7.jpg)
Controle de versõesPor que versionar?
![Page 8: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/8.jpg)
![Page 9: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/9.jpg)
Histórico de modificaçõesPor que versionar?
![Page 10: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/10.jpg)
BackupPor que versionar?
![Page 11: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/11.jpg)
![Page 12: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/12.jpg)
FlexibilidadePor que versionar?
![Page 13: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/13.jpg)
![Page 14: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/14.jpg)
Os tipos de Controle de Versão
![Page 15: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/15.jpg)
Sistemas de Controle de Versão LocalOs tipos de Controle de Versão
![Page 16: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/16.jpg)
![Page 17: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/17.jpg)
Sistemas de Controle de Versão Centralizados
Os tipos de Controle de Versão
![Page 18: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/18.jpg)
![Page 19: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/19.jpg)
Sistemas de Controle de Versão Distribuídos
Os tipos de Controle de Versão
![Page 20: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/20.jpg)
![Page 21: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/21.jpg)
Uma breve história do Git
![Page 22: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/22.jpg)
Noções básicas de Git
![Page 23: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/23.jpg)
Controle por snapshots e não por diferenças
Noções básicas de Git
![Page 24: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/24.jpg)
![Page 25: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/25.jpg)
![Page 26: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/26.jpg)
Quase todas as operações são locais!Noções básicas de Git
![Page 27: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/27.jpg)
A integridade do GitNoções básicas de Git
![Page 28: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/28.jpg)
Os três estados:Modificado, Preparado e Consolidado
Noções básicas de Git
![Page 29: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/29.jpg)
![Page 30: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/30.jpg)
Fluxos de trabalho com Git
![Page 31: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/31.jpg)
![Page 32: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/32.jpg)
Inicializando um repositórioNoções báscias de Git
![Page 33: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/33.jpg)
$ git init
![Page 34: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/34.jpg)
Clonando um repositórioNoções báscias de Git
![Page 35: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/35.jpg)
$ git clone https://github.com/example/repo.git
![Page 36: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/36.jpg)
Entendendo o status do seu repositóriocom Git Status
Noções báscias de Git
![Page 37: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/37.jpg)
$ git status
![Page 38: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/38.jpg)
Preparando os arquivos modificadoscom Git Add
Noções báscias de Git
![Page 39: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/39.jpg)
$ git add nome do arquivo
![Page 40: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/40.jpg)
Criando uma versão do projetocom Git Commit
Noções báscias de Git
![Page 41: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/41.jpg)
$ git commit -m "Mensagem"
![Page 42: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/42.jpg)
$ git commit -m "Cabô, carai!"
![Page 43: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/43.jpg)
![Page 44: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/44.jpg)
$ git commit -m "Correção de ..."$ git commit -m "Adição de ..."$ git commit -m "Nova feature ..."
![Page 45: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/45.jpg)
![Page 46: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/46.jpg)
O ciclo de vida do status dos arquivosNoções báscias de Git
![Page 47: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/47.jpg)
![Page 48: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/48.jpg)
Visualizando o histórico de commitscom Git Log
Noções báscias de Git
![Page 49: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/49.jpg)
$ git log
![Page 50: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/50.jpg)
Trabalhando com repositórios remotosNoções báscias de Git
![Page 51: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/51.jpg)
Atualizando seu repositório com Git Fetch
Noções báscias de Git
![Page 52: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/52.jpg)
$ git fetch
![Page 53: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/53.jpg)
O comando Git PullNoções báscias de Git
![Page 54: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/54.jpg)
$ git pull <nome servidor> <branch>
![Page 55: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/55.jpg)
![Page 56: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/56.jpg)
Enviando para o remoto com Git PushNoções báscias de Git
![Page 57: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/57.jpg)
$ git push <nome servidor> <branch>
![Page 58: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/58.jpg)
Dica ouro: criar pseudônimosNoções báscias de Git
![Page 59: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/59.jpg)
$ git config alias.vai-tigrao '!sh -c "git status; git add ."'
![Page 60: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/60.jpg)
$ git vai-tigrao
![Page 61: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/61.jpg)
Ramificação (Branching)
![Page 62: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/62.jpg)
![Page 63: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/63.jpg)
$ git branch
![Page 64: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/64.jpg)
Ramificação (Branching)
Adicionar nova branch
![Page 65: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/65.jpg)
$ git branch feature/product-search
![Page 66: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/66.jpg)
$ git checkout feature/product-searchSwitched to branch 'feature/product-search'
![Page 67: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/67.jpg)
$ git checkout -b feature/product-searchSwitched to a new branch 'feature/product-search'
![Page 68: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/68.jpg)
![Page 69: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/69.jpg)
$ git branch -l* master feature/product-search
![Page 70: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/70.jpg)
Ramificação (Branching)
Remover uma branch
![Page 71: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/71.jpg)
$ git branch -d feature/product-search
![Page 72: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/72.jpg)
![Page 73: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/73.jpg)
$ git merge feature/product-search
![Page 74: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/74.jpg)
![Page 75: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/75.jpg)
Controlado versões com Git Tag
![Page 76: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/76.jpg)
O Github
![Page 77: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/77.jpg)
![Page 78: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/78.jpg)
![Page 79: Git para não manjadores](https://reader035.vdocuments.pub/reader035/viewer/2022070519/58edc5ad1a28abe4438b464d/html5/thumbnails/79.jpg)
$ git commit -m "Valeu, galera!"