Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Git com o pé direito
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rodrigo Machado
August 30, 2014
Programming
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git com o pé direito
Palestra sobre git no FrontInterior 2014
Rodrigo Machado
August 30, 2014
More Decks by Rodrigo Machado
See All by Rodrigo Machado
Integração / Entrega Contínua
rcmachado
0
85
De Objective-C para Swift: Bibliotecas
rcmachado
0
110
Automação com Fabric
rcmachado
1
160
Other Decks in Programming
See All in Programming
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
310
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
470
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
140
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
110
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
Webの地図
yosuke_furukawa
PRO
6
5k
Heart of Swift Concurrency
koher
0
1.1k
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.5k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
430
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
290
Believing is Seeing
oripsolob
1
240
Mind Mapping
helmedeiros
1
390
Typedesign – Prime Four
hannesfritz
42
3.2k
The browser strikes back
jonoalderson
0
1.7k
The Cult of Friendly URLs
andyhume
79
7k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
The Language of Interfaces
destraynor
162
27k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
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