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
170
Modern Webapps
tsironis
1
88
Automating your workflow with Grunt
tsironis
2
180
Git 101
tsironis
0
200
Capistrano for non-Rubyists
tsironis
4
120
HTML+CSS: how to get started
tsironis
1
70
Coffeescript: unfancy javascript
tsironis
2
420
Coffescript - take a sip of code
tsironis
4
160
Startup Weekend Next Presentation
tsironis
2
160
Other Decks in Technology
See All in Technology
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
4
900
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
620
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
350
地理空間データ可視化・解析・活用ソリューション Pacific Spatial Solutions (PSS)
pacificspatialsolutions
0
150
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
330
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
190
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
370
VS CodeでAWSを操作しよう
smt7174
7
1.6k
私が trocco を推す理由
__allllllllez__
1
210
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
The Cult of Friendly URLs
andyhume
74
5.7k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
How to name files
jennybc
65
93k
Typedesign – Prime Four
hannesfritz
36
2.1k
Facilitating Awesome Meetings
lara
42
5.6k
We Have a Design System, Now What?
morganepeng
43
6.7k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
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