News from Git in Eclipse - EclipseCon 2015 Europe
Transcript of News from Git in Eclipse - EclipseCon 2015 Europe
News from Git in Eclipse
Matthias Sohn (SAP)Max Hohenegger
JGit
new ignore implementation
improved submodule support
aggressive gc
security fixes
3.6 Dec 2014
EGit
symlink support
improved submodule support
checkout ours / theirs
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
submodules nested under .git
Improved submodule support
use staging view for submodules(in separate projects)
available on files with conflictsCheckout ours / theirs
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+
JGit
basics for gitattributes
basics for hook support
logging
3.7 Feb 2015
EGit
auto-configure Gerrit
performance improvements
Auto-configure review when cloning from Gerrit
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
pre-commitcommit-msg
Hooks
e4 smart project import
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
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
Warn/block commit on errors
Compare Mode in Staging View
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
Custom diff/merge tools (e.g. p4merge)
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
.gitattributesvideo.mp4X.java
Large File Storage (LFS) extension
.git-- objects -- sha1
-- lfs -- objects -- sha256
git server
lfs server
git
lfs
.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
.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
.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
.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
+ .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
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)
Gitflow in a Nutshell
Author: Vincent DriessenOriginal blog post: http://nvie.com/posts/a-succesful-git-branching-modelLicense: Creative Commons BY-SA
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
Gitflow integration - Demo
GitflowWhat’s next?
it depends on you
- Gerrit integration
- Mylyn integration
- Maintaining features and releases
- ...
Questions & Answers