Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Introdução ao Git
Juliana Negreiros
July 20, 2020
Technology
0
22
Introdução ao Git
Juliana Negreiros
July 20, 2020
Tweet
Share
More Decks by Juliana Negreiros
See All by Juliana Negreiros
Um guia para começar no mundo Front End
juunegreiros
0
240
Desmistificando a área de TI
juunegreiros
0
12
Como otimizar seu site com lighthouse e core web vitals
juunegreiros
0
370
Webpacker e a Jornada do Heroi
juunegreiros
0
9
Como modularizar seu front-end sem depender de um framework
juunegreiros
0
33
Sopa de Letrinhas CSS | Alphabet soup CSS
juunegreiros
1
57
Pensando logicamente: introdução à lógica de programação | Thinking logically: introduction to programming logic
juunegreiros
0
38
Carreiras em TI
juunegreiros
0
35
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
92
Other Decks in Technology
See All in Technology
UWBを使ってみた
norioikedo
0
400
IoTLT88-NTKanazawa-laundry-dry
yukima0707
0
210
ROS再入門-はじめてのSLAM-
miura55
0
390
Scrum Fest Osaka 2022 フルリモート下でのチームビルディング
moritamasami
2
1.1k
雑な攻撃からELBを守る一工夫 +おまけ / Know-how to protect servers from miscellaneous attacks
hiroga
0
480
複数のスクラムチームをサポートするエンジニアリングマネジメントの話
okeicalm
0
1.1k
QiitaConference2022
fuwasegu
0
160
20220622_FinJAWS_あのときにAWSがあったらこうできた
taketakekaho
0
110
オンラインでのサーバー切替事例紹介/ColoplTech-05-01
colopl
0
170
越境チャレンジの現在地 〜Epic大臣制度の今〜
yousak
0
860
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
3
9k
LINEのB2Bプラットフォームにおけるトラブルシューティング2選
line_developers
PRO
3
290
Featured
See All Featured
Designing Experiences People Love
moore
130
22k
Music & Morning Musume
bryan
35
4.2k
The Pragmatic Product Professional
lauravandoore
19
3k
The Illustrated Children's Guide to Kubernetes
chrisshort
15
36k
Testing 201, or: Great Expectations
jmmastey
21
5.4k
Making Projects Easy
brettharned
98
4.3k
Statistics for Hackers
jakevdp
781
210k
Making the Leap to Tech Lead
cromwellryan
113
7.4k
It's Worth the Effort
3n
172
25k
What’s in a name? Adding method to the madness
productmarketing
11
1.6k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
126
8.5k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
Transcript
Introdução ao Git
O que é o Git?
Sistema de versionamento de código ou VCS (Version Control System)
O que um VCS faz?
Provê um histórico de mudanças
Provê um histórico de mudanças Permite voltar a um estado
anterior
Provê um histórico de mudanças Permite voltar a um estado
anterior Oferece suporte para o desenvolvimento paralelo
Indo mais além com o trabalho em equipe Plataformas Gitlab
Github Bitbucket
Por que versionar o meu código?
Reverter mudanças
Ter informações sobre o processo de desenvolvimento
Algumas perguntas que podem ser respondidas através do Git •
O que mudou? • Como o bug foi resolvido? • Quem fez as mudanças? • O que foi feito há um mês?
Unificar versões do desenvolvimento em paralelo
Evitar perdas e concertar acidentes
Fluxo do git
Repositório
Branch
Main
Commit
Main
Árvore
Main Secondary
Merge
Main Secondary
Rebase + merge
Main Secondary
Fluxo de trabalho individual
Inicializar o git git init
Clonar um repositório git clone
Criar uma branch para trabalhar git checkout -b nome-da-branch
Decidir quais alterações serão salvas git add "arquivo.js"
Criar o commit git commit
Subir as alterações git push origin nome-da-branch
Fluxo de trabalho coletivo
Abrir Pull Request
Abrir Pull Request
Abrir Pull Request
Abrir Pull Request
PR apontando para a branch certa
PR apontando para a branch certa
Revisar PR (importante!!!)
Revisar PR (importante!!!!)
Revisar PR (importante!!!!)
Mergear PR
Mergear PR
Issues
Issues
Projects
Projects
Automatizações
None
None
Deploy
Deploy
Integração Contínua e Desenvolvimento Contínuo (CI/CD)
Testes
Run Jest
Padronização
Super Linter
Utilidades
Arquivos
git add arquivo.js git rm arquivo.js
git stash git stash pop
git checkout -- arquivo.js
Mudanças
git diff
git log --oneline
git reflog git reset hashDoCommit
git commit --amend git push --force-with-lease
Branches
git checkout branch-alvo git branch -m novo-nome
git branch -d nomedabranch
- Documentação Github Actions - Documentação Git - Git -
the simple guide - Oh Shit, Git
Obrigada! @juunegreiros