Git

  • 516 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
516
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
12
Comments
0
Likes
1

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 Andrzej Grzesik Konrad Malawski LunarLogicPolska
  • 2. Andrzej  Grzesik past
  • 3. Konrad  Malawski
  • 4. Questions? Ask them right away!
  • 5. intro a distributed open source version control system
  • 6. intro is also fast reliable powerful popular
  • 7. it’s  proven
  • 8. still,  “git  go  away”   •  it is too new•  not tested•  does not provide backups (sic!)•  does not like windows•  does not support ...•  its not subversion
  • 9. git  is  not  subversion! Git is "simple" but hard.Subversion is "easy", but eventually complex. Thomas Nicolaisen (http://blog.tfnico.com/2011/11/some-thoughts-on-git-vs-complexity.html)
  • 10. basics !git config --global user.name Sheldon Cooper!git config --global user.email bazinga@bigbang.com!git config --global color.ui true!
  • 11. basics
  • 12. everybody  knows  that
  • 13. way  beDer  than  svn •  cherry-pick•  rebase (interactive)•  interactive add•  submodules•  git svn•  git sh
  • 14. space  efficient
  • 15. git  cherry-­‐‑pick
  • 16.                      git  cherry      pick
  • 17. git  submodules
  • 18. adding  submodule # initialize a submodulegit submodule add git://llp.pl/common.git common# initial pull of its contentsgit submodule init# pull pointed to commit (and overwrite your changes)git submodule update
  • 19. git  submodules
  • 20. updating  a  submodule cd commongit pullcd ..# Warning! Add the dir without trailing "/”git add commongit commit -m "Latest common submodule commit"
  • 21. git  submodules
  • 22. what  does  the  log  show?
  • 23. git  rebase ... or "Why merge isnt enough?"
  • 24. git  rebase
  • 25. git  rebase
  • 26. git  rebase
  • 27. git  svn
  • 28. git  svn
  • 29. git  svn
  • 30. git  svn
  • 31. git  svn
  • 32. git commit id maven plugin https://github.com/ktoso/maven-git-commit-id-plugin
  • 33. git commit id maven plugin Keeping commit info in UI of the running app, results in better (or less!) bug reports :-)
  • 34. git commit id maven plugin Or expose full details, for developers only@InjectGitRepositoryState repoState;@GET@Path("/git")public GitRepositoryState getRepoState(){ return repoState;} { "branch" : "testing-maven-git-plugin", "commitTime" : "06.01.1970 @ 16:16:26 CET", "commitId" : "787e39f61f99110e74deed68ab9093088d64b969", "commitIdAbbrev" : "787e39f", "commitUserName" : "Konrad Malawski", "commitUserEmail" : "konrad.malawski@java.pl", "commitMessageFull" : "releasing my fun plugin :-) + fixed some typos + cleaned up directory structure + added license etc", "commitMessageShort" : "releasing my fun plugin :-)", "buildTime" : "06.01.1970 @ 16:17:53 CET", "buildUserName" : "Konrad Malawski", "buildUserEmail" : "konrad.malawski@java.pl" }
  • 35. let’s  be  served!
  • 36. gitweb De facto standard of viewing git-based repositoriesJust point it to the repoWorks through Apache and CGI
  • 37. gitosis simple, read/write permissionsper-repositoryssh-key based authenticationbut its trivial to expose config file via f.ex. Grails frontend
  • 38. gerrit online code review(like ReviewBoard, but better ;-))also hosts git repositories review commits before they enter a branch
  • 39. gerrit     with some help        by the power of Jenkins,             allows to have pre-tested commits
  • 40. gerrit  quickly
  • 41. git  +  jenkins
  • 42. resources Git immersion:http://library.edgecase.com/git_immersion/index.htmlOn branching with Githttp://nvie.com/posts/a-successful-git-branching-model/Pro Git book (creative commons)www.progit.orgGit-scm.comGit.wiki.kernel.org