Git
-
Upload
patricio-dos-santos -
Category
Technology
-
view
249 -
download
2
description
Transcript of Git
![Page 1: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/1.jpg)
A ferramenta indispensável na bagagem do programador
![Page 2: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/2.jpg)
Quem Sou Eu?
Patrício dos SantosDesenvolvedor
Web: PHP, Ruby on Rails
Desktop: C#, Java
Entre outros…
http://www.patriciodossantos.nethttps://github.com/PSantos10/
![Page 3: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/3.jpg)
Git – O que é?
• Sistema de controle de versão distribuído;• Sistema de Gestão de Código Fonte;• Rápido e Eficiente;• Escrito pelo Linus Torvalds• Inicialmente escrito para o desenvolvimento do Kernel Linux.
![Page 4: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/4.jpg)
1. – Instalação e Configuração
• Windows• http://git-scm.com/download/win
• Linux• http://git-scm.com/download/linux
• Mac • http://git-scm.com/download/mac
![Page 5: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/5.jpg)
1.1. Instalação no Windows
![Page 6: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/6.jpg)
1.2. Configurações Iniciais
![Page 7: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/7.jpg)
We are Ready to Start!
![Page 8: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/8.jpg)
2.1. Criando novo repositório
git init
![Page 9: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/9.jpg)
2.2. Copiar um repositório
git clone c:\repositório_a
git [email protected]:PSantos10/minha_pagina.git
![Page 10: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/10.jpg)
Let’s do It!
![Page 11: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/11.jpg)
3. Fluxo de trabalho
• Working Directory• Index• HEAD
(Repository)
![Page 12: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/12.jpg)
4. Adicionar ficheiro ao repositório
git add index.php git add *
git commit –m “adicionando ficheiro index.php”
![Page 13: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/13.jpg)
5. Git Status
git status
![Page 14: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/14.jpg)
6. .gitignore
Exemplos: https://github.com/github/gitignore
Gerador: http://gitignore.io/
![Page 15: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/15.jpg)
Let’s do It!
![Page 16: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/16.jpg)
7. Repositório Remoto
![Page 17: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/17.jpg)
7.1. Adicionar Repositório Remoto
git remote add origin [email protected]:PSantos10/minha_pagina.git
![Page 18: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/18.jpg)
7.2. Enviando alterações para o rep. remoto
git push origin master
![Page 19: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/19.jpg)
7.3. Actualizando o repositório local
git pull
![Page 20: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/20.jpg)
Let’s do It!
![Page 21: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/21.jpg)
8. Outros comandos
git merge <branch>
git checkout –b <new_branch>
git log
git checkout <new_branch>
git tag 1.0.0 1b2e1d63ff
![Page 22: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/22.jpg)
Let’s do It!
![Page 23: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/23.jpg)
9. Ferramentas Gráficas
![Page 24: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/24.jpg)
![Page 25: Git](https://reader036.fdocumentos.tips/reader036/viewer/2022070321/558e79c81a28ab5d2c8b45b3/html5/thumbnails/25.jpg)
FIM
Obrigado!