Is there a way to retrieve eclipse executed git commands?

Please go to .git folder of your project. There will be a log folder like in my case (D:\Repo\GIT.git\logs)

all git command executed by eclipse are logged in respective branch file.

a sample of log is

0000000000000000000000000000000000000000 27f2e02544d389eb2412c1d467cc99f1786cd662 fanishshukla 1409137288 +0530 commit (initial): First Draft for Jboss 27f2e02544d389eb2412c1d467cc99f1786cd662 6d5634200cfdf6adf7c00ae70004326d2741e3a2 fanishshukla 1409557422 +0530 commit: fast response 6d5634200cfdf6adf7c00ae70004326d2741e3a2 32dbcfa55452b1a89861f422cfc7f90d26435d8c fanishshukla 1409557443 +0530 commit: fast response


EGit does not use the git executables. It reproduces, with the help of JGit, what the executables would do.

Git executables store the versioning state of a project in a number of files under the .git folder (branches, refs, commit objects, tags and so on).

EGit and JGit do the same.


For example:

A commit with git executables:

git commit -m "My commit message"

Would be executed in Java through EGit with CommitOperation.commit(), which uses JGit's CommitCommand.call(), which builds and inserts a commit object, which are representend through files.


There is no clear mapping between EGit's UI operations and their meaning as regular git commands, at least not to my knowledge.

One can go through (EGit, JGit, git)'s code and look for what is happening under the hood, though.


EDIT: a pgm package in JGit provides the inverse mapping: "Command-line interface Git commands implemented using JGit ("pgm" stands for program)"


EDIT: A not-merged Eclipse patch exists for logging what Egit does under the hood: https://git.eclipse.org/r/#/c/103342/

Tags:

Eclipse

Git

Egit