installing the MOTODEV core plugins into eclipse "git command" s - eclipse

I am going through the MOTODEV Core plugins installation here
I get to the step:
- "Use the git clone command to download the MOTODEV Core Plugins source repository into a working copy"
And this is where I get stuck. Where do I input this "git clone" command into Eclipse?

You could very easily do the clone from the command line as follows:
git clone https://android.googlesource.com/platform/tools/motodev.git
and then import the sources from the filesystem into eclipse -- it should pick up your project structure automatically.

Install "windows git" (http://msysgit.github.com/)
then type that git clone into a command line.
It keeps stopping between 43% and 61% for me though...damned aggravating because git clone doesn't have a continue command (I googled for a while for it and apparently it was a 2009 Google Summer of Code project but was never done)=:

Related

Eclipse - how to git clone --depth 1

I have to import a quite big (bitbucket) git repository in Eclipse.
Right now Eclipse is stuck cloning from an hour.
To speed up things I'd like to clone it in "shallow" mode (just taking the last commit).
I tested this with the CLI git clone --depth 1 https://bitbucket.myco.local:8443/scm/big/quite-big-project.git and it worked well: it took less than 2 minutes. Anyway I have to clone the project into eclipse and have no idea about how to set the depth in Eclipse's git import project wizard.
Unfortunately, JGit, the pure Java implementation of git used by Eclipse does not yet support the --depth option:
$ jgit clone --depth=1 https://github.com/eclipse-linuxtools/org.eclipse.linuxtools.eclipse-build.git
fatal: "--depth" is not a valid option
There is bug open for it over at bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475615
I would recommend cloning it via the normal git command line, and then using the "add existing local repo" button from the Git perspective:
I worked-around like this (in a way similar as what suggested #mboot):
1> I cloned the repository with CLI and --depth 1 option
2> I followed the procedure of import from git using "filesystem" protocol
3> Unbound the "filesystem" origin (git remote remove origin)
4> Added the "actual" remote git remote add origin https://bitbucket.myco.local:8443/scm/big/quite-big-project.git
5> Hoped for the best
android 13 can use jgit 6.3.0 ( shallow depth ) now
(Because jgit 6.3.0 user OutputStream.transferTo method )
see android 13 api 33

Can't clone nor stage git with lfs through egit

Enviroment
I did setup an test enviroment for git-lfs. This includes Git 1.9.5, Eclipse 4.6.2 and EGit 4.4.0/4.6.0. git-lfs is installed and works. Eclipse shows the right git configuration parameters set by git lfs install (Preferences->Team->Git->Configuration->User Settings). Git-lfs is available in the PATH of git bash and the windows CMD.
Git and Git-LFS just works fine throught git bash.
Problem
It's important that it's possible to use git throught Eclipse Plugins, which is currently EGit. EGit usually seems to support git-lfs, but in my case I am not able to clone nor stage (cloned throught git bash).
Clone:Execution of filter command 'git-lfs smudge -- 'SW/xy.jar'' on file 'SW/xy.jar' failed with return code '2', message on stderr: 'Downloading 'SW/xy.jar' (289.10 KB)
Stage: Execution of filter command 'git-lfs clean -- 'SW/xy.jar'' on file 'SW/xy.jar' failed
Questions
Does someone have any suggestion what am I doing wrong?
Why is git-lfs clean executed throught adding/staging?
Thanks in advance! Any help will be appreciated!
Updating from GIT 1.9.5 to the current Version (2.11.1) helped!

Is there a way to retrieve eclipse executed git commands?

I'm a regular git user, and I'm building some shortcuts in eclipse to activate some EGit functions.
I'm a bit wary of what is EGit doing (especially the synchronize workspace operations), and I was wondering if I could make EGit show what git commands it was using.
Do you know of an option to make it log to the console, or generally, how to find out which commands got executed?
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/
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
What I found here:
There's a bug regarding this requirement:
Bug 349551 - Log EGit activities into a console
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349551
How about git reflog to view command history of git

Install: GitHub gamejs

I started today working with gamejs for a small project. I saw that most project are repository files on github dot com, so I downloaded the github for windows and the git bash.
Then I used git bash to clone gamejs repository. I proceed the same with some repository stuff. However, it seems that I forget to install something... because I cannot start the server, I have gjs-server.sh or .cmd missing. The bash doesnt recognize the command. What will I do?
Since you cloned the code instead of downloading the release tarball you need to build GameJS first:
Change into the GameJs directory
cd gamejs
Get all needed submodules with git:
git submodule init git submodule update
Compile RingoJs:
ant -f ./server/ringojs/build.xml jar
EDIT: Prior to building you need to install Apache Ant build tool. Since it is a Java application to install it just download the binary distribution from their download page and unzip it.

forking a project from GitHub

I want to fork a suggester for elasticsearch from Github.
I'm following the steps on the website, I'm asked to run the following code:
git://github.com/spinscale/elasticsearch-suggest-plugin.git
Which class shall I run it in ? and shall I create a new project for it or shall I run it in my current project?
I'm working with eclipse and play framework.
The only line where I see "git://github.com/spinscale/elasticsearch-suggest-plugin.git" at the GitHub elasticsearch-suggest-plugin page is:
If you want to work on the repository
Clone this repo with git clone git://github.com/spinscale/elasticsearch-suggest-plugin.git
Run: gradle clean assemble zip – this does not run any unit tests, as they take some time. If you want to run them, better run gradle clean build zip
Install the plugin: /path/to/elasticsearch/bin/plugin -install elasticsearch-suggest -url file:///$PWD/build/distributions/elasticsearch-sugges
So this line is about cloning locally that repo to run the plugin.
It is not about a "class to run". It is an address that the DVCS (Distributed Version Control System) Git must use to clone the repo.
git clone git://github.com/spinscale/elasticsearch-suggest-plugin.git