a byte of git
weng.wei@zalora.sg
Friday, July 5, 13
• Linus Torvalds on git
• http://www.youtube.com/watch?
v=4XpnKHJAok8
Friday, July 5, 13
• "tinker and fix things that aren't broken" -
The greatest geek who ever lived
• http://theoatmeal.com/comics/tesla
Friday...
No Silver Bullet
Git solves problems with some price
Friday, July 5, 13
Git is hard
• Different concept
• More concept
• More command
• Not Windows friendly
Friday, July 5, 13
concepts
• changesetVS revision
• distributedVS centralized
• http://hginit.com/00.html
• a Mercurial tutorial by Joel Spo...
git staging
• demo
Friday, July 5, 13
git ci --amend
• Edit commit history is common
• sacred revision history in SVN
Friday, July 5, 13
git push
• commit is only local
• Must push to remote repo
Friday, July 5, 13
Why bother?
• staging / commit / amend / push
• vs svn commit
• Better change management !!!
Friday, July 5, 13
git stash
• Demo
Friday, July 5, 13
git branch
• very cheap to create
• 16 bytes written on local disk
• git flow
Friday, July 5, 13
Friday, July 5, 13
SVN upstream
Friday, July 5, 13
Problem!
• svn diff -r 354791:358048 > ../
SEAFAS-7136.diff
• Take hours
• SEAFAS-7136.diff
• 33361 lines
• Contains chang...
• How long does it take to upstream on
branch?
• What if you have 10 branches to do
upstream?
• What if upstream has confli...
All SVN problems have
SVN solutions
We could do everything in SVN..
Friday, July 5, 13
BUT! We don’t have to
Friday, July 5, 13
git rebase
• Take seconds
• Error?
• git rebase --abort
• Or, test in a new branch
Friday, July 5, 13
Demo
Friday, July 5, 13
Awesome git usages
• host your blog
• deployment tools
• ...
Friday, July 5, 13
git for deployment
demo with heroku
Friday, July 5, 13
Q & A
Friday, July 5, 13
Access control
• Via ssh
• Read & Write access control
• Different repos with different access
• production repo
• staging...
GUI?
• Who needs GUI?
• Mac
• SourceTree
• Win & Linux
• TortoiseGit?
Friday, July 5, 13
Upcoming SlideShare
Loading in …5
×

A byte of git

505 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
505
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A byte of git

  1. 1. a byte of git weng.wei@zalora.sg Friday, July 5, 13
  2. 2. • Linus Torvalds on git • http://www.youtube.com/watch? v=4XpnKHJAok8 Friday, July 5, 13
  3. 3. • "tinker and fix things that aren't broken" - The greatest geek who ever lived • http://theoatmeal.com/comics/tesla Friday, July 5, 13
  4. 4. No Silver Bullet Git solves problems with some price Friday, July 5, 13
  5. 5. Git is hard • Different concept • More concept • More command • Not Windows friendly Friday, July 5, 13
  6. 6. concepts • changesetVS revision • distributedVS centralized • http://hginit.com/00.html • a Mercurial tutorial by Joel Spolsky • Subversion Re-education Friday, July 5, 13
  7. 7. git staging • demo Friday, July 5, 13
  8. 8. git ci --amend • Edit commit history is common • sacred revision history in SVN Friday, July 5, 13
  9. 9. git push • commit is only local • Must push to remote repo Friday, July 5, 13
  10. 10. Why bother? • staging / commit / amend / push • vs svn commit • Better change management !!! Friday, July 5, 13
  11. 11. git stash • Demo Friday, July 5, 13
  12. 12. git branch • very cheap to create • 16 bytes written on local disk • git flow Friday, July 5, 13
  13. 13. Friday, July 5, 13
  14. 14. SVN upstream Friday, July 5, 13
  15. 15. Problem! • svn diff -r 354791:358048 > ../ SEAFAS-7136.diff • Take hours • SEAFAS-7136.diff • 33361 lines • Contains changes from trunk Friday, July 5, 13
  16. 16. • How long does it take to upstream on branch? • What if you have 10 branches to do upstream? • What if upstream has conflicts? Friday, July 5, 13
  17. 17. All SVN problems have SVN solutions We could do everything in SVN.. Friday, July 5, 13
  18. 18. BUT! We don’t have to Friday, July 5, 13
  19. 19. git rebase • Take seconds • Error? • git rebase --abort • Or, test in a new branch Friday, July 5, 13
  20. 20. Demo Friday, July 5, 13
  21. 21. Awesome git usages • host your blog • deployment tools • ... Friday, July 5, 13
  22. 22. git for deployment demo with heroku Friday, July 5, 13
  23. 23. Q & A Friday, July 5, 13
  24. 24. Access control • Via ssh • Read & Write access control • Different repos with different access • production repo • staging repo Friday, July 5, 13
  25. 25. GUI? • Who needs GUI? • Mac • SourceTree • Win & Linux • TortoiseGit? Friday, July 5, 13

×