Your SlideShare is downloading. ×
Git and XCode - Nsspain2013
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Git and XCode - Nsspain2013

1,185
views

Published on

Slide for the presentation "Git and Xcode" given @NSSpain 2013 in Logroño, Spain.

Slide for the presentation "Git and Xcode" given @NSSpain 2013 in Logroño, Spain.

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
1,185
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Git and XCode Alfonso Alba @aprendegit martes, 17 de septiembre de 13
  • 2. martes, 17 de septiembre de 13
  • 3. How? martes, 17 de septiembre de 13
  • 4. Minimum man-hour martes, 17 de septiembre de 13
  • 5. • If you commit often: • Your commits will be smaller • Your history will be more readable • It will be easier to cherry-pick or revert martes, 17 de septiembre de 13
  • 6. Commit often XCode 4 XCode 5 ALT-CMD-C martes, 17 de septiembre de 13
  • 7. martes, 17 de septiembre de 13
  • 8. • If you do not write good commit messages martes, 17 de septiembre de 13
  • 9. Write good commit messages XCode 4 XCode 5 You cannot commit empty messages martes, 17 de septiembre de 13
  • 10. • If you commit only related changes • Your history will be more readable • It will be easier to find bugs • It will be easier to cherry-pick or revert martes, 17 de septiembre de 13
  • 11. Commit related changes You cannot commit chunks XCode 4 XCode 5 martes, 17 de septiembre de 13
  • 12. • If you use branches • It will cost you less effort to switch context • It will be easier to do code review • You will try new things more often • It will be easier to refactor martes, 17 de septiembre de 13
  • 13. Use branches Have you ever tried to change a branch in XCode? XCode 4 XCode 5 martes, 17 de septiembre de 13
  • 14. THE Problem: Merging martes, 17 de septiembre de 13
  • 15. “My” experience with git is: martes, 17 de septiembre de 13
  • 16. • You will have problems with • xcuserdata • xcworspacedata • Core Data Models • .xib files • Story Boards • Assets martes, 17 de septiembre de 13
  • 17. How to deal with / mitigate THE problem martes, 17 de septiembre de 13
  • 18. • xcuserdata • Do not include this file in your rempository • Use a good .gitignore file • http://stackoverflow.com/questions/ 49478/git-ignore-file-for-xcode-projects martes, 17 de septiembre de 13
  • 19. • xcworkspacedata • ... you will have to resolve conflics manually martes, 17 de septiembre de 13
  • 20. • Core Data Models • Create the models on code (Daniel Eggert contribution) • Use migrations •Test your models • Sessions and Workshops during the conference!! martes, 17 de septiembre de 13
  • 21. • XIB and Story Boards • ... well, if it was easy our life would be much boring!! martes, 17 de septiembre de 13
  • 22. Do not use xib files or story boards: Yes, you will have to write code martes, 17 de septiembre de 13
  • 23. This is my code, don’t you dare touch it!! martes, 17 de septiembre de 13
  • 24. • If you want to use Interface Builder • Split the story boards • Use xib files instead of story boards • Agree on a workflow and/or protocol • Good team comunication • Use file locking (subversion) • git checkout --theirs / git checkout --ours martes, 17 de septiembre de 13
  • 25. DEMO: git checkout-index martes, 17 de septiembre de 13
  • 26. baboon https://github.com/SeyZ/baboon martes, 17 de septiembre de 13
  • 27. baboon baboon client working copy baboon client working copy bare repo martes, 17 de septiembre de 13
  • 28. Other tools martes, 17 de septiembre de 13
  • 29. • git • Interactive staging • git-bisect • git filter-branch / BGF repo cleaner (http://rtyley.github.io/bfg-repo- cleaner/) • Hooks • Incremental merging: http://softwareswirl.blogspot.nl/2013/05/git-incremental-merge.html • sort-Xcode-project-file http://danieltull.co.uk/blog/2013/09/05/easier-merging-of-xcode-project- files/ (Chris Eidhof contribution) • SemanticMerge http://www.semanticmerge.com/ martes, 17 de septiembre de 13
  • 30. Is git your tool? martes, 17 de septiembre de 13
  • 31. • Git is not perfect • BAD for binary files • No folders • Guess file renaming • Too flexible • Steep learning curve • No file locking martes, 17 de septiembre de 13
  • 32. Access Control martes, 17 de septiembre de 13
  • 33. No history rewrites martes, 17 de septiembre de 13
  • 34. Undo martes, 17 de septiembre de 13
  • 35. • Enterprise tools • Github Enterprise • Stash • Sourceforge • PlasticSCM martes, 17 de septiembre de 13
  • 36. One more thing... martes, 17 de septiembre de 13
  • 37. Git is not a backup system martes, 17 de septiembre de 13
  • 38. Thank you!! martes, 17 de septiembre de 13
  • 39. info@aprendegit.com http://www.aprendegit.com @aprendegit @aalbagarcia martes, 17 de septiembre de 13