Git
Upcoming SlideShare
Loading in...5
×
 

Git

on

  • 603 views

 

Statistics

Views

Total Views
603
Views on SlideShare
584
Embed Views
19

Actions

Likes
1
Downloads
8
Comments
0

2 Embeds 19

http://www.linkedin.com 14
https://www.linkedin.com 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Git Git Presentation Transcript

  • git Andrzej Grzesik Konrad Malawski LunarLogicPolska
  • Andrzej  Grzesik past
  • Konrad  Malawski
  • Questions? Ask them right away!
  • intro a distributed open source version control system
  • intro is also fast reliable powerful popular
  • it’s  proven
  • 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
  • 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)
  • basics !git config --global user.name Sheldon Cooper!git config --global user.email bazinga@bigbang.com!git config --global color.ui true!
  • basics
  • everybody  knows  that
  • way  beDer  than  svn •  cherry-pick•  rebase (interactive)•  interactive add•  submodules•  git svn•  git sh
  • space  efficient
  • git  cherry-­‐‑pick
  •                      git  cherry      pick
  • git  submodules
  • 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
  • git  submodules
  • updating  a  submodule cd commongit pullcd ..# Warning! Add the dir without trailing "/”git add commongit commit -m "Latest common submodule commit"
  • git  submodules
  • what  does  the  log  show?
  • git  rebase ... or "Why merge isnt enough?"
  • git  rebase
  • git  rebase
  • git  rebase
  • git  svn
  • git  svn
  • git  svn
  • git  svn
  • git  svn
  • git commit id maven plugin https://github.com/ktoso/maven-git-commit-id-plugin
  • git commit id maven plugin Keeping commit info in UI of the running app, results in better (or less!) bug reports :-)
  • 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" }
  • let’s  be  served!
  • gitweb De facto standard of viewing git-based repositoriesJust point it to the repoWorks through Apache and CGI
  • gitosis simple, read/write permissionsper-repositoryssh-key based authenticationbut its trivial to expose config file via f.ex. Grails frontend
  • gerrit online code review(like ReviewBoard, but better ;-))also hosts git repositories review commits before they enter a branch
  • gerrit     with some help        by the power of Jenkins,             allows to have pre-tested commits
  • gerrit  quickly
  • git  +  jenkins
  • 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