Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page 1 TBD www.groupe-sii.com 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy - 75012 Paris Tél : 01 42 84 82 22 - Fax : 01 42 84 30.

Similar presentations


Presentation on theme: "Page 1 TBD www.groupe-sii.com 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy - 75012 Paris Tél : 01 42 84 82 22 - Fax : 01 42 84 30."— Presentation transcript:

1 Page 1 TBD www.groupe-sii.com 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy - 75012 Paris Tél : 01 42 84 82 22 - Fax : 01 42 84 30 82

2 Page 2 TBD Sommaire 12/08/2014 Git is Fast GIT is Distributed GIT is SCM Git is Reliable Using Git Git is Agile Git Re-Writing History Git Workflow

3 Page 3 TBD GIT is SCM « branch » « merge »

4 Page 4 TBD Panorama des SCM

5 Page 5 TBD A little about history …

6 Page 6 TBD Git is not an evolution

7 Page 7 TBD Who is using Git

8 Page 8 TBD GIT is Distributed Distributed Fast Reliable

9 Page 9 TBD Centralized SCM Single Point of Failure Network (slow) Access Rights?

10 Page 10 TBD Git is Distributed No a priori structure But Git ≠ Anarchy

11 Page 11 TBD Git is Distributed A very common practice: Sharing via user-owned repos READ ONLY RD/WR

12 Page 12 TBD Git is Distributed A very common practice: Sharing via user-owned repos Git Hosting: https://git.wiki.kernel.org/index.php/GitHostinghttps://git.wiki.kernel.org/index.php/GitHosting :

13 Page 13 TBD Git is Distributed Hosted

14 Page 14 TBD Distributed Workflow Example Integration-Manager Dictator & Lieutenants

15 Page 15 TBD Distributed Workflow Example Other developers only READ Only Dan may WRITE New Release develop, commit Share Features Integrate Features

16 Page 16 TBD Distributed Workflow Example Integration-Manager Dictator & Lieutenants

17 Page 17 TBD Distributed Workflow Example

18 Page 18 TBD GIT Avantages Distributed Fast Reliable

19 Page 19 TBD GIT is Fast 100% local

20 Page 20 TBD GIT is Fast

21 Page 21 TBD GIT is Fast

22 Page 22 TBD GIT is Fast

23 Page 23 TBD GIT is Fast

24 Page 24 TBD GIT is Fast

25 Page 25 TBD GIT is Fast

26 Page 26 TBD GIT is Fast

27 Page 27 TBD GIT is Fast

28 Page 28 TBD GIT is Fast

29 Page 29 TBD GIT is Fast

30 Page 30 TBD GIT is Fast

31 Page 31 TBD GIT is Fast

32 Page 32 TBD Git Object Database

33 Page 33 TBD Git Object Database

34 Page 34 TBD Git Object Database

35 Page 35 TBD Git Object Database

36 Page 36 TBD Git Object Database

37 Page 37 TBD Git Object Database

38 Page 38 TBD Git Object Database

39 Page 39 TBD Git Object Database

40 Page 40 TBD Git Object Database

41 Page 41 TBD Git Object Database

42 Page 42 TBD Git Object Database

43 Page 43 TBD Git Object Database

44 Page 44 TBD Git Object Database

45 Page 45 TBD Git Object Database

46 Page 46 TBD Git Object Database

47 Page 47 TBD Git Object Database

48 Page 48 TBD Git Object Database

49 Page 49 TBD Git Object Database $ git cat-file -p 8e8eb67 tree 91dc8d579f123918f3ac43af1e9377a97128763b author Laurent Kappel 1407751282 +0200 committer Laurent Kappel 1407751282 +0200 Mon premier commit

50 Page 50 TBD Git Object Database

51 Page 51 TBD Git Object Database $ git tag -a v2.0 -m 'my version 2.0' $ cat.git/refs/tags/v2.0

52 Page 52 TBD Git Object Database

53 Page 53 TBD This makes Git Fast Restore an arbitrary version – Git: checkout a hash = O(1) – SVN: diffs between n last commits = O(n) Compare 2 revisions Reset Search through history And many more…

54 Page 54 TBD Some Benchmarking http://git-scm.com/about/small-and-fast

55 Page 55 TBD Git is Reliable Distributed Fast Reliable

56 Page 56 TBD Git is Reliable 1.Because it’s Distributed  Single dev with a remote? => 2 copies (local, remote) .git/ has it all 2.Checksums (SHA-1) for all objects Git uses  Detects data corruption  Guarantees Authenticity

57 Page 57 TBD Using Git

58 Page 58 TBD Using Git $ git clone https://github.com/tpaskap/gitdoc.githttps://github.com/tpaskap/gitdoc.git Cloning into ‘gitdoc'... remote: Counting objects: 67870, done. remote: Compressing objects: 100% (13454/13454), done. remote: Total 67870 (delta 49179), reused 67358 (delta 48872) Receiving objects: 100% (67870/67870), 51.40 MiB | 5.15 MiB/s, done. Resolving deltas: 100% (49179/49179), done. $ cd gitdoc $ ls –a... ppt.git.gitignore LICENSE README Local Repo Working Directory

59 Page 59 TBD Using Git $ git remote –v origin https://github.com/tpaskap/GITDOC.git (fetch)https://github.com/tpaskap/GITDOC.git origin https://github.comt/paskap/GITDOC.git (push)https://github.comt/paskap/GITDOC.git $ git branch * master $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master $ git log -n 3 --oneline 424a7b2 Merge pull request #202 from g-oikonomou/cc2538-minor-fixes 704309c Change the InfoPage Location of the IEEE address 8b5b2bd CC2538 Documentation typo and grammar fixes

60 Page 60 TBD Using Git

61 Page 61 TBD Using Git

62 Page 62 TBD Using Git

63 Page 63 TBD Using Git

64 Page 64 TBD Using Git Modification of tracked content Modification of tracked content New, untracked content

65 Page 65 TBD Using Git

66 Page 66 TBD Using Git Content of the next commit Content of the next commit

67 Page 67 TBD Using Git

68 Page 68 TBD Using Git

69 Page 69 TBD Using Git

70 Page 70 TBD Using Git

71 Page 71 TBD Using Git

72 Page 72 TBD Using Git

73 Page 73 TBD Using Git Merges are done LOCALLY! “Git push failed, To prevent from losing history, non-fast forward updates were rejected”  Not an error, but common-sense  Files are rarely decorrelated

74 Page 74 TBD Using Git

75 Page 75 TBD Using Git

76 Page 76 TBD Using Git

77 Page 77 TBD Using Git Still not permitted  Git is happy  But how can PROJECT authors trust you?

78 Page 78 TBD Using Git $ git remote add cetic git@github.com:login/GITDOC.git

79 Page 79 TBD Using Git $ git remote add cetic git@github.com:lkappel/GITDOC.git git push cetic master OK alias du remote nom utilisateur

80 Page 80 TBD Using Git $ git remote add cetic git@github.com:lkappel/GITDOC.git $ git push cetic master OK New repo = 2 commands ! Remote Repo $ git push [remote] [branch] $ git push [remote] [branch[:alias]] alias remote branch

81 Page 81 TBD Using Git

82 Page 82 TBD Using Git

83 Page 83 TBD Using Git

84 Page 84 TBD Using Git Jan Krüger’s Cheat Sheet http://jan-krueger.net/git

85 Page 85 TBD Using Git Git LOVES branches, and so should you

86 Page 86 TBD Git is Agile

87 Page 87 TBD Git is Agile

88 Page 88 TBD Git is Agile

89 Page 89 TBD Git is Agile

90 Page 90 TBD Git is Agile

91 Page 91 TBD Git is Agile

92 Page 92 TBD Git is Agile

93 Page 93 TBD Git is Agile

94 Page 94 TBD Git is Agile

95 Page 95 TBD Git is Agile

96 Page 96 TBD Re-Writing History

97 Page 97 TBD Re-Writing History

98 Page 98 TBD Re-Writing History git rebase –i 8b5b2bd

99 Page 99 TBD Re-Writing History

100 Page 100 TBD Re-Writing History

101 Page 101 TBD Re-Writing History

102 Page 102 TBD Re-Writing History

103 Page 103 TBD Re-Writing History

104 Page 104 TBD Cherry-Picking

105 Page 105 TBD Cherry-Picking

106 Page 106 TBD Cherry-Picking

107 Page 107 TBD Others commands

108 Page 108 TBD Workflow – How to structure a repository Branches and their interactions How the project moves forward – Organizing people Who accesses what How are contributions merged? Where? By who? Responsibilities Working together with Git  « Workflow » ?

109 Page 109 TBD GitFlow http://nvie.com/posts/a-successful-git-branching-model/

110 Page 110 TBD GitFlow

111 Page 111 TBD GitFlow

112 Page 112 TBD GitFlow

113 Page 113 TBD GitFlow

114 Page 114 TBD GitFlow

115 Page 115 TBD GitFlow https://github.com/nvie/gitflow

116 Page 116 TBD Workflow – How to structure a repository Branches and their interactions How the project moves forward – Organizing people Who accesses what How are contributions merged? Where? By who? Responsibilities Working together with Git  « Workflow » ?

117 Page 117 TBD Integration Manager Workflow

118 Page 118 TBD Dictator & Lieutenants Workflow

119 Page 119 TBD Getting Started with Git Book: Pro Git. http://www.git-scm.comhttp://www.git-scm.com Selected Tutorials: – Git Immersion http://gitimmersion.com/http://gitimmersion.com/ – Learn Git Branching workflow : http://nvie.com/posts/a-successful-git-branching-model/http://nvie.com/posts/a-successful-git-branching-model/ interactive : http://pcottle.github.io/learnGitBranching/http://pcottle.github.io/learnGitBranching/ More material: – https://training.github.com/https://training.github.com/

120 Page 120 TBD The End Questions ? Thanks !


Download ppt "Page 1 TBD www.groupe-sii.com 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy - 75012 Paris Tél : 01 42 84 82 22 - Fax : 01 42 84 30."

Similar presentations


Ads by Google