Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git com o pé direito
Search
Rodrigo Machado
August 30, 2014
Programming
1
96
Git com o pé direito
Palestra sobre git no FrontInterior 2014
Rodrigo Machado
August 30, 2014
Tweet
Share
More Decks by Rodrigo Machado
See All by Rodrigo Machado
Integração / Entrega Contínua
rcmachado
0
76
De Objective-C para Swift: Bibliotecas
rcmachado
0
100
Automação com Fabric
rcmachado
1
130
Other Decks in Programming
See All in Programming
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
120
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
770
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.8k
WebDriver BiDiとは何なのか
yotahada3
1
140
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
SpringBoot3.4の構造化ログ #kanjava
irof
2
970
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
890
Formの複雑さに立ち向かう
bmthd
1
720
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
100
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Six Lessons from altMBA
skipperchong
27
3.6k
Unsuck your backbone
ammeep
669
57k
Producing Creativity
orderedlist
PRO
343
39k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
Transcript
Git com o pé direito Ou como parar de ter
10+ cópias do mesmo projeto espalhadas pelo computador
Sobre mim Desenvolvedor sênior "full stack” no Queremos! / WeDemand
PHP, Python, MySQL, MongoDB, AWS ~ 10 anos de estrada
Sobre o git
História Linus Torvalds (criador do Linux) em 2005 Criado para
substituir um software proprietário (BitKeeper) Curiosidade: o linux tem ~6000 desenvolvedores - então o git é robusto!
Atenção! !=
Esse é o git
Vantagens Permite que você trabalhe numa funcionalidade nova sem quebrar
o que já está pronto Essencial se existe mais de 1 pessoa trabalhando no projeto
Utilizado na maioria das empresas de desenvolvimento
Começando com o git Onde colocar meu repositório?
GitHub https://github.com/
BitBucket https://bitbucket.org/
Comandos que importam
Obtendo o repositório
O que tem pra comitar?
O que estou comitando?
Adicionando arquivos
Commit
Baixar (e aplicar) commits
Mandar commits pro servidor
– http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is “Um branch no Git é simplesmente um ponteiro
para um dos commits do repositório.” Branch
Criar um branch
Quais são os meus branches?
Mudar para um branch
git log
Avançando um pouco
git alias $ git alias st status
git alias
git alias $ git alias glog "log —all --pretty='format: %d
%Cgreen%h%Creset %an - %s' --graph"
git alias
Merge vs Rebase
Merge vs Rebase Merge • Mais simples • Histórico "poluído"
• O git decide como juntar seu código Rebase • Maior controle na resolução de conflitos • Histórico mais “limpo” • Mais complexo
Text http://stackoverflow.com/questions/11671668/combine-several- commits-and-merging-as-one-commit-into-other-branches
Text http://kevin.deldycke.com/2011/02/moving-git- subtree-repository/
git reflog Armazena todas as ações executadas: Commits Novos branches
Merges etc.
git reflog
git reflog
GUIs Simplificando a vida
GitHub GUI https://mac.github.com/ https://windows.github.com
Tower http://www.git-tower.com
Source Tree http://www.sourcetreeapp.com
Dicas
Commits
Text http://xkcd.com/1296/
Cuidado com ****** Evite commitar “segredos” no repositório Segredos: senhas,
chaves de acesso, etc.
Workflow da equipe Defina um workflow da equipe (ex. merge
vs rebase) Padronização de nomes de branches (ex. issue #) Para equipes maiores: git-flow http://nvie.com/posts/a- successful-git-branching-model/ Cuidado: não crie regras demais :)
Text Branches são leves http://i.imgur.com/seDixfY.jpg
Master "entregável" Mantenha o master “entregável" Evite commitar coisas pela
metade
Text Pratique! https://try.github.com/
Links http://nvie.com/posts/a-successful-git-branching- model/ https://marklodato.github.io/visual-git-guide/index- en.html https://try.github.com/ http://www.git-tower.com/blog/git-cheat-sheet-detail- pt/
Obrigado! @rcmachado rcmachado https://speakerdeck.com/rcmachado