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
130
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
81
De Objective-C para Swift: Bibliotecas
rcmachado
0
110
Automação com Fabric
rcmachado
1
150
Other Decks in Programming
See All in Programming
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
Fluid Templating in TYPO3 14
s2b
0
130
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
450
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
CSC307 Lecture 03
javiergs
PRO
1
490
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
First, design no harm
axbom
PRO
2
1.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Fireside Chat
paigeccino
41
3.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Everyday Curiosity
cassininazir
0
130
New Earth Scene 8
popppiees
1
1.5k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Building Adaptive Systems
keathley
44
2.9k
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