I am trying to complete the Google Android Sample App - DrEdit. See link: DrEdit Google Android App.
My question: How do I "Clone DrEdit's git repo and init submodules"? It is step 2 in the link. Please advise. I am using Eclipse. Also, I am a new to Android.
What I've tried: I've opened Eclipse, then clicked on Window->Open Perspective->Other->Git Respository Exploring->Clone a Git Repository. But I am not sure where to go or what to enter from there.
Please help.
run the follinw in your command line:
git clone https://github.com/googledrive/dredit.git
cd dredit
git submodule init
git submodule update
I guess, there are equivalent buttons in egit. But I never used it. Command line is more intuitive for git.
In the end, you need to import/create the eclipse project from the folder created above.
you've just to execute git submodule init and git submodule update after cloning your project.
Related
There are several examples on StackOverflow and on the web for creating a repository on GitHub and dowloading the repository into Eclipse. Most of these examples are very basic and very old.
I am looking for an up to date and clear step by step example that shows how to upload an existing Maven project from Eclipse to GitHub. The instructions here fail every time.
I thought this would be really easy to do. It has been two hours of frustration. Is there a more elegant solution out there than GitHub?
I would just handle it as it was a normal folder you want to push to GitHub.
So what you basically do is just what Github says if you create a new repo:
Navigate the bash into your folder, then...
git init
git add -A
git commit -m "first commit"
git remote add origin YOUR_GIT_REPO_LINK
git push -u origin master
I think this is the easiest way to do it.
I have modified the instructions found here that kept failing for me.
Go to github create new empty repository
Copy the https URL from github
Go to Eclipse --> Right click on project --> Team--> share project-->
Create new Git Repo.
Go to Git Staging--> Stage all changes --> "Commit" (do not "Commit and Push")
Right click on your Git Repository, select "Push Branch Master"
Paste your https URL of githun which you copy in step 2
I am trying to build this demo program (github and website below) in netbeans. I cannot seem to get it to run properly. How do i go about importing both SQLInject and SQLInject1?
SQLInject1 gives errors regarding build.xml ant files.
How do i create these projects in netbeans properly?
https://www.javacodegeeks.com/2012/11/sql-injection-in-java-application.html?fbclid=IwAR10XX-PWMdRdhyQfce_613kmhszUZxj_gyg3h_0VJmY1dgXEAss8Ksuhcc
https://github.com/ramkicse/Sql-Injection-in-Java
First, install git. You can do that here: https://git-scm.com/downloads
Then, clone the desired repository. You can do this by opening a git Bash shell and executing this command:
git clone <the repository here>
For example:
git clone https://github.com/ramkicse/Sql-Injection-in-Java.git
Then, open the project in NetBeans. This can be done by following the "Setting Up a Java Project Based on Existing Sources" instructions described here.
Until now I was using Eclipse + SVN with the typical project App + project libraries.
I use a single SVN repository using the following structure:
root
-Apps
-App1
-trunk
-tags
-branches
-Libs
-Lib1
-trunk
-tags
-branches
-Lib2
-trunk
-tags
-branches
I ported the project to Android Studio and I'm trying to do store the modules in a Git repo. I'm starting with Git and I don't achieve it, it seems like git is prepared to have one project per repository, isn't it? How can I solve that?
Thanks
Git is ready for that, just use git submodules. Separate your projects in different repositories and then link them together as submodules, let me point you to a guide:
http://git-scm.com/book/en/v2/Git-Tools-Submodules
So for example, if you are in your project A and want to add project B, do:
git submodule add https://github.com/myrepo/B
And then do:
$ git submodule init
$ git submodule update
I've imported a project from Git in Eclipse using this method:
File > Import > Git > Projects from Git > Next > Clone URL .
At this point I inserted the URI like this https://github.com/mygituser/My-Project .
Then my user and password, and the project was imported.
The problem is that Eclipse didn't recognize it as a Java project, and I really don't know why.
As consequence, I can't see errors or warnings on my project and neither use autocomplete, I'm getting this message "This compilation unit is not on the build path of a Java project".
Also, right click on My-Project > Build path shows the message "No actions avaliable".
If you need more information to help me, could you ask me on comments, please?
I appreciate your attention!
Most people don't include build files in repositories, only source. What you need to do is create a new Eclipse project the create a Git repo on top of that:
Create a new Eclipse project, and go to it with your terminal.
git init to initialize a repo.
git remote add origin https://github.com/mygituser/My-Project to add the remote.
git pull -u origin master to pull the changes.
Also, make sure that when you commit, you don't add build files that the author kept out. You can do this via a .gitignore file. Simply take this file and add it to your project directory.
This method applies to most Git repositories, as build and compiled files are usually left out.
Note that this method requires that you install Git for command line (or Git Bash). You can get Git at their website.
Since you already have the source code downloaded from the git repository, you should be able to create an Eclipse project from the existing source code.
My firm is making me move back to Eclipse and I am trying to move GIT Project from IntelliJ IDEA to Eclipse with EGit?. The issue I am having is that I access my project from the command line with the following command:
git clone git#git:common.git
That's how I clone it and then I just work in IntelliJ without a issue, In Eclipse with EGit I am getting the following screen and every setting I am trying down work
Can someone please tell me based on the command line what options I should be using.. thanks
I've always had problems cloning via EGit. Here's what works for me:
Clone via the command-line as usual.
Create or import your project into an Eclipse workspace.
Right-click the project in the Navigator or Package Explorer.
Team > Share Project > Git > Next.
Since there will already be .git repo there, select 'Use or create repo in parent...".
Finish. Give it a few seconds and you should see your project files decorated with Git repo information.