Git made-it easy

5,543 views

Published on

The Centurion project team has moved on GIT, see why and how.

http://centurion-project.org

Published in: Technology
2 Comments
5 Likes
Statistics
Notes
No Downloads
Views
Total views
5,543
On SlideShare
0
From Embeds
0
Number of Embeds
255
Actions
Shares
0
Downloads
58
Comments
2
Likes
5
Embeds 0
No embeds

No notes for slide

Git made-it easy

  1. Easy versioning with GIT<br />Yes it can<br />
  2. No! No different! Only different in your mind.<br />You must unlearn what you have learned<br />Master Yoda<br />Git from day to day<br />Before<br />Now<br />svn up<br />git pull<br />svn commit<br />git commit<br />Is this really harder than before ?<br />
  3. Why have we changed ?<br />Chaotic centralized workflow<br />Merge / Debug is painfull<br /><ul><li>Too much regressions</li></li></ul><li>Why GIT ?<br />Because GIT is …<br />Trendy (not really a good reason…)<br />Easy to use<br />Amazingly fast<br />It comes with an entire philosophy/workflow<br />
  4. Reminder about key concepts<br />Working directory (aka working tree => WT)<br /><ul><li>Your own file system
  5. Staging area
  6. Snapshot of the diff that will be committed on next “commit”
  7. Repository
  8. GIT storage</li></li></ul><li>Reminder about key concepts<br />
  9. Reminder about key concepts<br />Untracked<br /><ul><li>GIT doesn’t know about this file
  10. Unmodified
  11. File in WT is the same than the one from the repository
  12. Modified
  13. File in WT has been modified and not committed yet
  14. Staged
  15. File is ready to be committed and will become unmodified after</li></li></ul><li>Reminder about key concepts<br />
  16. Branching<br />What for?<br />Work in an environment as stable as possible<br />Avoid conflict that slow productivity (for others)<br />Being able to integrate new features one by one<br />This is true for every versioning tools !<br />But GIT is amazingly fast for these branching operation <br />(so fast that the “cheap branching” has appeared)<br />
  17. Branching<br />git branch iss53<br />git checkout iss53<br />…<br />git commit<br />
  18. Branching<br />git checkout master<br />git merge iss53<br />
  19. Branching<br />One branch for the stable release<br />One branch for development (testing)<br />One branch per topic (short development) branched from the dev branch<br />
  20. My team and I<br />Fine, but all is on my local file system, solution ?<br /><ul><li>Go find a job on a desert island
  21. Learn how to use “git remote” command </li></ul> (and sisters commands)<br />
  22. Local and Remotes<br />Install GIT on a server (that’s not the topic of this presentation)<br />Create a repository on the server<br /><ul><li>git remote add [name] [repository]
  23. gitpull/fetch [repository] [refspec]
  24. git push [repository] [refspec]</li></li></ul><li>Why, When, Where?<br />Coupled with branching philosophy<br />Deliver only stable features (others are aware that they fetch stable or unstable code)<br />Don’t even share your (dirty) code with the rest of your team<br />Merge feature on your repository don’t share it until it’s stable<br />
  25. Workflow<br />Integration manager<br />
  26. Workflow (example)<br />A contributor clones a repository and makes changes.<br />The contributor pushes to their own public copy.<br />The contributor sends the maintainer an e-mail asking them to pull changes.<br />The maintainer adds the contributor’s repo as a remote and merges locally.<br />The maintainer pushes merged changes to the main repository.<br />
  27. Credits<br />Slides made by Mathias DESLOGES (Centurion Core Developer) :<br />http://centurion-project.org/ <br />Figures and examples are taken from the excellent “Pro Git” web site :<br />http://progit.org/<br />
  28. The End<br />

×