news from git in eclipse - eclipsecon 2015 europe

31
News from Git in Eclipse Matthias Sohn (SAP) Max Hohenegger

Upload: msohn

Post on 12-Feb-2017

929 views

Category:

Software


0 download

TRANSCRIPT

Page 1: News from Git in Eclipse - EclipseCon 2015 Europe

News from Git in Eclipse

Matthias Sohn (SAP)Max Hohenegger

Page 2: News from Git in Eclipse - EclipseCon 2015 Europe

JGit

new ignore implementation

improved submodule support

aggressive gc

security fixes

3.6 Dec 2014

EGit

symlink support

improved submodule support

checkout ours / theirs

Page 3: News from Git in Eclipse - EclipseCon 2015 Europe

much faster

support ** pattern

**/foo/bar matches foo/bar in any directoryabc/** matches everything (infinite depth) under abca/**/b matches "a/b", "a/x/b", "a/x/y/b“ and so on

support ! to negate rules defined previously

.a ignore .a files! lib.a but do track lib.a

New ignore implementation

Page 4: News from Git in Eclipse - EclipseCon 2015 Europe

submodules nested under .git

Improved submodule support

use staging view for submodules(in separate projects)

Page 5: News from Git in Eclipse - EclipseCon 2015 Europe

available on files with conflictsCheckout ours / theirs

Page 6: News from Git in Eclipse - EclipseCon 2015 Europe

Fix Git vulnerability

.GiT

case-insensitive FS

matches .git

GIT~1

Windows short-names

matches .git

.g\u200cit

HFS+ (Mac)

matches .git since \u200c is ignored invisible unicode characterprepare malicious commit

on case-sensitive FS

.GiT/config

GIT~1/refs/heads/master

.g\u200cit/config

checkout on affected platform can manipulate content of .git

➔ fixed in 3.4.2, 3.5.3, 3.6+

Page 7: News from Git in Eclipse - EclipseCon 2015 Europe

JGit

basics for gitattributes

basics for hook support

logging

3.7 Feb 2015

EGit

auto-configure Gerrit

performance improvements

Page 8: News from Git in Eclipse - EclipseCon 2015 Europe

Auto-configure review when cloning from Gerrit

Page 9: News from Git in Eclipse - EclipseCon 2015 Europe

JGit

hooks

move to Java 7

API cleanup

4.0 Jun 2015

EGit

basic git-flow support

e4 smart project import

API to prepare model merge

allow to symlink .git

Page 10: News from Git in Eclipse - EclipseCon 2015 Europe

pre-commitcommit-msg

Hooks

Page 11: News from Git in Eclipse - EclipseCon 2015 Europe

e4 smart project import

Page 12: News from Git in Eclipse - EclipseCon 2015 Europe

JGit

basics for push certificates

improve ignore rules

pack expiration during gc

4.1 Sept 2015

EGit

merge strategy extension point

warn or block commit on errors

compare mode in staging view

Page 13: News from Git in Eclipse - EclipseCon 2015 Europe

plugin externalmerge strategyimplementations

used by EMF to providemodel merge strategy

➔ "EMF Compare and EGit" session by Laurent Delaigue at 16:15 in Theater

Merge strategy extension point

Page 14: News from Git in Eclipse - EclipseCon 2015 Europe

Warn/block commit on errors

Page 15: News from Git in Eclipse - EclipseCon 2015 Europe

Compare Mode in Staging View

Page 16: News from Git in Eclipse - EclipseCon 2015 Europe

JGit

improved s3 support

.gitattributes

clean/smudge filters

basic LFS support

LFS server

cooking for 4.2 Dec 2015

EGit

configure date format

multi-push

external diff/merge tools

configure merge strategy

Page 17: News from Git in Eclipse - EclipseCon 2015 Europe

Custom diff/merge tools (e.g. p4merge)

Page 18: News from Git in Eclipse - EclipseCon 2015 Europe

Versioning large binaries in Git

large binary files can't be packed by Git efficiently

➔ slows down transport➔ gc more expensive and less efficient➔ Git repository quickly becomes bulky➔ Git server load grows

Page 19: News from Git in Eclipse - EclipseCon 2015 Europe

.gitattributesvideo.mp4X.java

Large File Storage (LFS) extension

.git-- objects -- sha1

-- lfs -- objects -- sha256

git server

lfs server

git

lfs

Page 20: News from Git in Eclipse - EclipseCon 2015 Europe

.gitattributesvideo.mp4X.java

LFS configuration

.git-- config objects -- sha1

-- lfs -- objects -- sha256

*.mp4 filter=lfs diff=lfs merge=lfs -text[filter "lfs"]smudge = git-lfs smudge %fclean = git-lfs clean %f

[lfs "http://lfs-server/]access = basic

which files to be handled by LFS ?

lfs clean filter intercepts add

lfs smudge filter intercepts checkout

pre-push hook sends LFS objects to LFS server

Page 21: News from Git in Eclipse - EclipseCon 2015 Europe

.gitattributesvideo.mp4X.java

git add video.mp4

.git-- objects -- sha1

-- lfs -- objects -- sha256

version git-lfs/spec/v1id sha256:5891b5b522...size 6

store meta data in objectsstore big file in lfs objects

lfs clean filter

video.mp4

Page 22: News from Git in Eclipse - EclipseCon 2015 Europe

.gitattributesvideo.mp4X.java

git push origin

.git-- objects -- sha1

-- lfs -- objects -- sha256

git server

lfs server

pre-push hook

version git-lfs/spec/v1id sha256:5891b5b522...size 6

push

video.mp4

Page 23: News from Git in Eclipse - EclipseCon 2015 Europe

.gitattributesvideo.mp4X.java

git fetch/clone, git checkout

.git-- objects -- sha1

-- lfs -- objects -- sha256

git server

lfs server

version git-lfs/spec/v1id sha256:5891b5b522...size 6

fetch all meta-data

checkout loads lazily

video.mp4

Page 24: News from Git in Eclipse - EclipseCon 2015 Europe

+ .gitattributes+ run clean filter on add+ run smudge filter on checkout+ run pre-push hook on push- run filters during diff, merge, handle clone ➔ use external lfs in JGit/EGit with existing LFS server (e.g. GitHub)

- LFS extension implemented in JGit- JGit LFS server- LFS server Gerrit plugin➔ builtin lfs in JGit/EGit with Gerrit / LFS server plugin

LFS support in JGit / Gerrit

Page 25: News from Git in Eclipse - EclipseCon 2015 Europe

Gitflow?workflow & branching strategy

“It forms an elegant mental model that is easy to comprehend and allows team members to develop a shared understanding of the branching and releasing processes.”

- Vincent Driessen

(creator of Gitflow)

Page 26: News from Git in Eclipse - EclipseCon 2015 Europe

Gitflow in a Nutshell

Author: Vincent DriessenOriginal blog post: http://nvie.com/posts/a-succesful-git-branching-modelLicense: Creative Commons BY-SA

Page 27: News from Git in Eclipse - EclipseCon 2015 Europe

Gitflow in Eclipse

functional but not finished

+ feature start, finish, checkout, rebase

+ release start, start from commit, finish

+ hotfix start, finish

- several optional parameters

- support branches

Page 28: News from Git in Eclipse - EclipseCon 2015 Europe

Gitflow integration - Demo

Page 29: News from Git in Eclipse - EclipseCon 2015 Europe

GitflowWhat’s next?

it depends on you

- Gerrit integration

- Mylyn integration

- Maintaining features and releases

- ...

Page 30: News from Git in Eclipse - EclipseCon 2015 Europe

Questions & Answers

Page 31: News from Git in Eclipse - EclipseCon 2015 Europe