An introduction to Git.

744 views

Published on

an introduction to git for the students of the multimedia 2012 course at KULeuven.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
744
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • An introduction to Git.

    1. 1. Sten Govaerts KU Leuven
    2. 2. what the hell...• distributed version control
    3. 3. what the hell...• distributed version control• originally designed and developed by Linus Thorvalds.
    4. 4. what the hell...• distributed version control• originally designed and developed by Linus Thorvalds.• git (plural gits) (noun) • (UK, slang, pejorative) A contemptible person. • (UK, slang, pejorative) A silly, incompetent, stupid, annoying or childish person.
    5. 5. distributed? centralised distributedversion control version control GIT SVN or CVS http://www.slideshare.net/lydian/git-tutorial
    6. 6. but why?...• easier offline usage
    7. 7. but why?...• easier offline usage• easier to branch projects
    8. 8. but why?...• easier offline usage• easier to branch projects• git is good at merging files and re-joining branches
    9. 9. git philosophy• Commit early, commit often!• 1 commit = 1 idea or change • easy to read patches by team members • easy to revert changes later• local repo is your working directory
    10. 10. why do we need this?• group work • help each other• work on multiple locations• common back-end development?• learning analytics
    11. 11. how does it work? file states • modified • staged • commited
    12. 12. how does it work?
    13. 13. how does it work? dev B shared repo dev A dev C
    14. 14. how does it work? dev B git clone shared repo dev A dev C
    15. 15. how does it work? dev B sharedgit push repo dev A dev C
    16. 16. how does it work? dev B sharedgit push repo dev A dev C
    17. 17. how does it work? dev B sharedgit push repo git push dev A dev C
    18. 18. how does it work? dev B sharedgit push repo git push dev A dev C
    19. 19. how does it work? dev B sharedgit push repo dev A dev C
    20. 20. how does it work? dev B shared git fetchgit push repo git merge dev A dev C
    21. 21. • http://www.github.com• make an account (use twitter name) and one repository per group• put repository link on wiki • http://ariadne.cs.kuleuven.be/wiki
    22. 22. what do you do next?• student A makes the github repository
    23. 23. what do you do next?• student A makes the github repository• student A commits his work to his local repository and pushes to github
    24. 24. what do you do next?• student A makes the github repository• student A commits his work to his local repository and pushes to github• student B fetches the repository, commits his work locally and pushes to github
    25. 25. what do you do next?• student A makes the github repository• student A commits his work to his local repository and pushes to github• student B fetches the repository, commits his work locally and pushes to github• student C fetches the repository, commits his work locally and pushes to github
    26. 26. how to do this?• command line (4 1337 h4x0rz)• IDE tools • eclipse (http://www.vogella.com/articles/EGit/article.html) • xcode (http://support.beanstalkapp.com/customer/portal/ articles/95580-setting-up-git-with-xcode-4 & http:// developer.apple.com/library/mac/#recipes/xcode_help- repositories_organizer/articles/ CommittingFilestoaRepository.html#//apple_ref/doc/uid/ TP40010350-CH8-SW1)
    27. 27. tools• http://eclipse.github.com/• http://windows.github.com/• http://mac.github.com/
    28. 28. git commands cheat sheet• http://www.git-tower.com/files/cheatsheet/ Git_Cheat_Sheet_grey.pdf
    29. 29. further reading...• Setup github• Create a repo on github• Fork a repo• Everyday GIT with 20 commands or so• Advanced GIT tutorial• GITcasts• Git docs

    ×