git in eclipse

19
Git in Eclipse Dariusz Łuksza Blog: http://luksza.org Mail: [email protected]

Upload: dariusz-luksza

Post on 11-Nov-2014

441 views

Category:

Technology


7 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Git in Eclipse

Git in Eclipse

Dariusz ŁukszaBlog: http://luksza.orgMail: [email protected]

Page 2: Git in Eclipse

2

Agenda

● What Git is?● History● Git vs. CVS/SVN● How Git works?

● Git commands● What EGit 0.8.1 can do?● Demo Time!

● First: project, commit, branch, tag, fetch, push, merge● Keep high code quality thanks to Git

Page 3: Git in Eclipse

3

History of Git'a2005 - Linus Torvalds starts Git

2006 - Proof-of-concept, quite unusable

2007 - Index reader, quickdiff

2008 - Add history view, commit, push/fetch

2009 - Eclipse decides on Git; moved to Eclipse.org

3/2010 - Released 0.7.0

Diff/Merge

Automatic IP Logs

Preliminary merge algorithm implementation (not really usable for now on)

6/2010 - Released 0.8.0

Usability Improvements

Git Repositories View

Tagging Slide taken from presentation:Understanding and Using Git at Eclipse | © 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Page 4: Git in Eclipse

4

Git vs. CVS/SVN

● Distributed (but …)● Ability to work off-line● Full local history

● Versions are described using SHA-1

● Fast and lightweight branches

● Checkout on repository level

● Complex tag's

● Centralized● no● no

● Numerically described versions

● Every branch is a full copy of repository

● Checkout on file/catalog level

● Simple tag's

Page 5: Git in Eclipse

5

How Git works?Saves state not deltas.

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

Page 6: Git in Eclipse

6

How Git works?Objects

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

Page 7: Git in Eclipse

7

How Git works?Branches and tags

Image taken from Pro Git book (http://progit.org)

v1.0

Page 8: Git in Eclipse

8

How Git works?

Merge (fast-forward)

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

fast-forwardmerge

Page 9: Git in Eclipse

9

How Git works?

Merge (three-way merge)

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

three-waymerge

Page 10: Git in Eclipse

10

How Git works?Rebase

1.

2.

3.

Page 11: Git in Eclipse

11

How Git works?Structure of .git

extensions

global exclude filerecord branch changes

object storage

local branchesdefault main branch

remote tracking branches, divided by repositorydefault remote repository

default remote branch

configuration for this repository

cache for staging changes for next committip of current branch

Page 12: Git in Eclipse

12

Git commands

● git init / git clone

● git add

● git status

● git commit

● git diff

● git fetch

● git log

● git merge

● git rebase

● git remote

● git pull

● git push

● git stash

● git branch

● git tag

● git checkout

● git config

● git format-patch

● git mv / git rm

● git reset

Page 13: Git in Eclipse

13

Git commands

● git init / git clone

● git add

● git status

● git commit

● git diff

● git fetch

● git log

● git merge

● git rebase

● git remote

● git pull

● git push

● git stash

● git branch

● git tag

● git checkout

● git config

● git format-patch

● git mv / git rm

● git reset

Page 14: Git in Eclipse

14

What EGit 0.8.1 can do?

● git init / git clone

● git add

● git status

● git commit

● git diff

● git fetch

● git log

● git merge

● git rebase

● git remote

● git pull

● git push

● git stash

● git branch

● git tag

● git checkout

● git config

● git format-patch

● git mv / git rm

● git reset Autorem grafik jest:Deleket (Jojo Mendoza)

Page 15: Git in Eclipse

15

Demo Time!

Page 16: Git in Eclipse

16

Create and share project locally.

First demo

Page 17: Git in Eclipse

17

Second Demo

Working with remote project.

We'll use gitosis as a Git server and CGit for on-line project presentation.

Page 18: Git in Eclipse

18

Third demo

Benefiting from distributed VCS.

Using Git and Gerrit for keeping project in good shape.

Page 19: Git in Eclipse

19

Q&A

● Git: http://git-scm.com/● EGit: http://eclipse.org/egit/● JGit: http://eclipse.org/jgit/● EGit mailing list:

http://dev.eclipse.org/mhonarc/lists/egit-dev/● JGit mailing list:

http://dev.eclipse.org/mhonarc/lists/jgit-dev/● There is also an EGit forum on Eclipse forums:

http://www.eclipse.org/forums/