19
Git Can GIT make your life easier? 06/12/2022

Git and eclipse

Embed Size (px)

DESCRIPTION

This presentation gives an introduction to git and EGit was presented at the Belgian Eclipse User Group meeting of August 31th hosted by Inventive Designers.

Citation preview

Page 1: Git and eclipse

04/12/2023

Git

Can GIT make your life easier?

Page 2: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

2

Agenda

• About me• Introduction to Git• Demo• Conclusions

Page 3: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

3

About me

• Nick Van den Bleeken• R&D Manager at Inventive Designers• Member of the XForms WG at W3C

Page 4: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

4

Survey

• Who is not using source control?• SVN?• CVS?• Git?

Page 5: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

5

What is Git?

• Distributed Version Control System• Scalable and Fast• Non-linear, custom workflows– Subversion-Style Workflow– Integration Manager Workflow– Dictator and Lieutenants Workflow–…

Page 6: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

6

Git and Eclipse

• EGit: Eclipse Team Provider for Git• JGit: lightweight Java library implementing

Git

• Eclipse is moving to Git as SCM (ETA end 2010)

Page 7: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

7

Git vs SVN/CVS

Distributed (git)• Full local history• Cheap local branching• Fast• Rebase patches easily• Powerful merging

Centralized (CVS)• No• No• Slow• Patches go stale• Merging is a pain

Page 8: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

8

Git Basics (1)

Stores data as snapshots, not differences

(Images taken from http://progit.org/book)

Page 9: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

9

Git Basics (2)

• Nearly every operation is local• Git has integrity• Git generally only adds data

Page 10: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

10

Git Basics (3)

(Images taken from http://whygitisbetterthanx.com)

• The staging area

Page 11: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

11

Git Typical usage

Workingdirectory

Stagingarea

Local repo

remoterepo

git add

git commit

git push

git fetch

git checkout

git merge

Page 12: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

12

Branches and tags

(Images taken from http://progit.org/book)

• Branches– Creating a branch is quick (write 41

bytes)– Long running / Topic branches

• Tags– Lightweight tag

• branch that doesn’t change

– Annotated tag• Check summed• Tagger info• Tagging message• Optionally signed (GNU Privacy Guard)

Page 13: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

13

rebasemerge

Merging

• Git determines the best common ancestor to use for its merge base (different than CVS)

(Images taken from http://progit.org/book)

Page 14: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

14

rebase

Merging

• Git determines the best common ancestor to use for its merge base (different than CVS)

(Images taken from http://progit.org/book)

Page 15: Git and eclipse

Inventive Designers – The output innovators

Demo

EGit and Gerrit

15

Page 16: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

16

Conclusion

• Git is very powerful• Git is scalable and fast• Git supports convenient branching and

merging• All revisions of every file are locally

available

• Git is the feature SCM of Eclipse

Page 17: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

17

EGit Features

git init / git clone git add git status git commit git diff(partial)

git fetch Git log(partial)

git mergegit rebase

git remote

git pull git push git stash git branch git tag(partial)

git checkout(partial)

git config git format-patch(partial)

git mv/git rm(partial) git reset

Page 18: Git and eclipse

04/12/2023 Inventive Designers – The output innovators

18

Resources

• Git documentation http://git-scm.com/documentation

• Pro Git book http://progit.org/book

• EGit User Guide http://wiki.eclipse.org/EGit/User_Guide

• GitHub https://github.com/

Page 19: Git and eclipse

Inventive Designers – The output innovators

Questions?

19