Skip to main content
Jump to: navigation, search

EGit/New and Noteworthy/5.12




  • Staging view shows info about conflict type.
  • Replace With→Ours/Theirs removes the file and stages the deletion if the file was deleted in the ours or theirs commit. Simplifies resolving modify-delete conflicts.
  • Replace With→Ours/Theirs in Package Explorer/Project Explorer.


  • Merge Editor improvements


EGit 5.12 offers new API giving third-party bundles access to git information.

The org.eclipse.egit.core bundle offers the following new interfaces and classes:

  • this accessor interface can be obtained via adaptation using Adapters.adapt(someObject, GitInfo.class);. Via the interface, clients can determine the JGit Repository the item is in, its path within the repository, whether it is from the working tree, the git index, or a commit (and if so, which commit), and what its git state is.
    • someObject can be anything; in particular it could be an org.eclipse.core.resources.IFile or an or an
    • If GitInfo.getRepository() == null, someObject is not in an EGit-managed git repository.
    • If the adaptation itself returns null, the item is either not in an EGit-managed git repository, or EGit doesn't know how to provide a GitInfo for someObject.
  • this can be obtained via GitInfo.getGitState() and tells the git state for the item in the git repository at that path. This can be used to determine whether the item has staged changes in the index, whether it was modified in the working tree only, whether it is in a conflict state, and so on. (Client code can also obtain such information given the repository and the git path by using JGit directly and looking up the information directly in the git index. GitItemState may be more efficient since it uses an optimized cache inside EGit that EGit uses internally, too.)
  • org.eclipse.egit.core.revisions.FileRevisionFactory exposes factory methods to create objects for items in the git index or in a git commit. This is useful if client code wants to compare items from a git repository.
  • org.eclipse.egit.core.util.RevCommitUtils offers some utility methods; in particular a method to determine the "theirs" commit in a conflict.

Existing client code is strongly encouraged to use this new API instead of accessing EGit internal non-API classes directly.

Other Changes

EGit 5.12 includes some less noticeable improvements in the UI, plus a number of bug fixes. The complete list of new features and bug fixes is available in the release notes.


The following X developers worked on this release:

<TBD: list of contributors, number>

See Also

See also the new features in JGit for additional information.

Back to the top