Mahara UK 2011 Technical Day - Git for Mahara

1,792 views

Published on

My presentation/workshop from the Mahara UK 2011 technical day.
This gives a quick insight into Git, what git is, some of the useful features of git are, and how it can be used in Mahara.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Mahara UK 2011 Technical Day - Git for Mahara

  1. 1. Mahara UK 2011 – Technical Conference21st June 2011<br />
  2. 2. Andrew Nicols<br />Git in Mahara<br />
  3. 3. Git in Mahara<br /><ul><li>What is Git?
  4. 4. Some of the Basics
  5. 5. Remotes
  6. 6. Branch, Branch, Branch!!!
  7. 7. Rebases and Merges
  8. 8. Splitting and Squashing
  9. 9. Other Cool Stuff
  10. 10. Q&A</li></li></ul><li>What is Git?<br /><ul><li>Free
  11. 11. Open Source
  12. 12. Distributed Version Control System
  13. 13. Every Git Clone is a full-fledged repository
  14. 14. Complete History
  15. 15. Not network dependent
  16. 16. No requirement for central server
  17. 17. Very fast</li></li></ul><li>Some Basics<br /><ul><li>git clone
  18. 18. git init
  19. 19. git add
  20. 20. git add –p
  21. 21. git commit
  22. 22. git commit --amend
  23. 23. git log
  24. 24. git log –stat=500
  25. 25. git log -p
  26. 26. git status
  27. 27. git diff
  28. 28. git diff --cached</li></li></ul><li>Remotes<br />Git is great for collaborative working<br />It allows you to have multiple remotes<br />git remote<br />git remote show<br />git remote add<br />git fetch<br />git push<br />
  29. 29. Branch, Branch, Branch!!!<br />Branches are cool<br />Branches don’t suck in Git (yes I know they do in subversion)<br />git checkout –b <branchname><br />git branch<br />git branch --all<br />
  30. 30. Rebases and Merges<br />Rebase rewrites history<br />Merge combines histories<br />Rebasing changes the parent of a commit<br />Don’t use rebase if you’re going to step on someone elses toes<br />git rebase origin/master<br />git rebase gerrit/master<br />git merge my_local_branch<br />
  31. 31. Rebases and Merges<br />
  32. 32. Rebases and Merges<br />
  33. 33. Rebases and Merges<br />
  34. 34. Rebases and Merges<br />
  35. 35. Splitting and Squashing<br />Re-write your commits before you make them public<br />Keep things tidy<br />git edit –i HEAD~3<br />
  36. 36. Other Cool Stuff<br />git grep<br />git cherry-pick<br />git format-patch<br />git bisect<br />git reflog<br />gitk<br />git shortlog<br />git archive<br />
  37. 37. Q&A<br />

×