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 201
Search
Dimitris Tsironis
May 31, 2013
Technology
0
150
Git 201
Branching Models basic, Merging & how Github's pull request work
Dimitris Tsironis
May 31, 2013
Tweet
Share
More Decks by Dimitris Tsironis
See All by Dimitris Tsironis
How to Develop Backbone Plugins (...for the greater good!)
tsironis
0
200
Modern Webapps
tsironis
1
89
Automating your workflow with Grunt
tsironis
2
180
Git 101
tsironis
0
200
Capistrano for non-Rubyists
tsironis
4
130
HTML+CSS: how to get started
tsironis
1
70
Coffeescript: unfancy javascript
tsironis
2
440
Coffescript - take a sip of code
tsironis
4
160
Startup Weekend Next Presentation
tsironis
2
160
Other Decks in Technology
See All in Technology
Estrategias de escalabilidade para projetos web
jessilyneh
2
210
Optuna: a Black-Box Optimization Framework
pfn
PRO
1
100
標準ライブラリの奥深アップデートを掘り下げよう!
logica0419
2
440
Oracle Database Backup Service:サービス概要のご紹介
oracle4engineer
PRO
0
4.1k
CRTO/CRTL/OSEPの比較・勉強法とAV/EDRの検知実験
chayakonanaika
1
1k
AI活用したくてもできなかった不動産SaaSの今とこれから
nealle
0
220
SORACOMで実現するIoTのマルチクラウド対応 - IoTでのクリーンアーキテクチャの実現 -
kenichirokimura
0
330
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
210
音声AIエージェントの世界とRetell AI入門 / Introduction to the World of Voice AI Agents and Retell AI
rkaga
4
890
アプリをリリースできる状態に保ったまま 段階的にリファクタリングするための 戦略と戦術 / Strategies and tactics for incremental refactoring
yanzm
6
490
Swift Testingのconfirmationを コードリーディング/Dive into Swift Testing confirmation
laprasdrum
1
200
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
9.5k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
174
9.3k
Documentation Writing (for coders)
carmenintech
65
4.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
30
2.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
Building Your Own Lightsaber
phodgson
101
6k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
24
3.9k
Navigating Team Friction
lara
183
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
34
1.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
Transcript
Git 201 FreeFriday @ Teipir
Real quick...
Dimitris Tsironis Front-end Engineer at BugSense, JavaScript lover || hater,
Open-source & (Coffee)Script addict, Technology afficcionado
Previously on Free Fridays...
How can we work more effectively in a team?
Introducing Branching have multiple versions of the same project work
async & simultaneously safer & more clean way to do things very “cheap” branches
Git This is where the Git magic is happening!
creating a branch $ git branch <new-branch-name> # Creates a
new branch $ git checkout <new-branch-name> # Switch to new branch $ git branch # Check your local branches
creating a branch #2 # Creates a new branch and
switches to it immediately $ git checkout -b <new-branch-name>
Now, you can code as hard as you can!
Cool story, bro! But, how can we move our code
to our main branch and continue with our lives?
Merging Merge two branches Keep the chances you want to
keep You’re in control It’s easier in Git than in other VCS
merging a local branch $ git checkout <dest-branch> # Switch
to destination $ git merge <branch-name> # Merge the specified branch $ git log # Check if everything is fine
Once you’ve finished... You should do some housekeeping!
deleting a branch # Deletes branch, but keeps commits $
git branch -d <branch-name> # Force deletes everything, both branch and its commits $ git branch -D <branch-name> # USE WISELY!!
The Github way How Github handles branches & merging
Branches on Github Nothing special here Push your branches on
Github Has some awesome tools for branches
pushing to Github # Push branch on Github $ git
push origin <branch-name>
Pull Requests A nice, Web 2.0 way to handle merges,
branch and working in a team
Pull requests Promoting collaboration Encouraging open source contributions (fork) Discussing
features & changes on the go Merge without hassle and delete the branch
The real power is in the details! Let’s see...
Pull requests: reloaded Discussion for almost everything Can be created
before coding starts You have a timeline history of commits Forum-like functionality lots of integrations and extra tools
Extra tig (apt-get install tig, brew install tig) Github Help
Git basics presentation Git documentation
And, as always, practice, practice, PRACTICE!
Thanks! @tsironakos