I have a Server with SSH access. On this server I have a php/yii project including a git repository (so versioned with git). Is it possible to use the EGit Team Provider (which just works fine for local projects/ .git folders) for those remote projects?
I just get nullpoint exceptions with the wizard (Share project) and cant get EGit to recognize the existing git project.
Maybe could try this by creating a fresh test .git repo on a linux server, add a php file, use eclipse remote system to browse by ssh for the folder containing the .git folder, use right click on that folder->create remote project and then somehow figure out how EGit could be added...
EGIT doesn't recognize the repository if it doesn't end with .git extension
Login to the LINUX server
cd to path in which you want the repository in
mkdir your_project_name.git //This will create the repository
git init --bare //This will actually initialize the git repository
clone this repository
add files in the local repo
add files to index, commit and push to master
Related
I'm confused how to setup my project correct. There is already a existing git repository named "DatabaseHub" which is only containing the README.md after my first commit. Then I have there my Spring Initializr zip which I want to use for this repository. I named it databaseHub as well. It's a Gradle project.
When I'm trying to create the project with this zip in Eclipse in my git project I fail.
What I tried: Cloned the git repo (so it is in the project explorer), tried to import the extracted initializr zip with the option "Existing Gradle project" but this won't work cause of the name collision.
I don't get what's the right attempt to start this. Just putting all the files manually in the repo doesn't let Eclipse know that it's even a project now.
Eclipse version is 2019-09.
Try and unzip that project elsewhere on your disk.
Then go to your local Git repository (the one with the single README) and do:
cd /path/to/local/Git/repo
git --work-tree=/path/to/unzipped/project add .
git restore -- .
git commit -m "Import project"
The git restore -- . step (with Git 2.23+, August 2019) will make sure your imported files are checked out and visible within your local repository.
Finally, import the Gradle project: Eclipse should detect the Git repository in it (if not, do a Team > Share)
I use eclipse 3.8.2 and I've installed EGit plugin ver 3.6.2.
I'm trying to clone the projects from the remote repository into the current eclipse workspace by using EGit and I see a message notice me that
"C:\Eclipse\Workspace\project is not an empty directory"
(because it's contain .meta-data folder).
So how can I clone the remote repository into the workspaces of eclipse while it's running ? (because I don't want to use the Git Bash to clone it before I start eclipse)
Thank in advance.
It looks like your repository is already cloned (means there is a local repository under c:\Users\username\git
So, either you delete your project directory in your local repo and you clone like you did under eclipse
Or (preferred), you simply add your existing repo into your eclipse workspace with :
Git repository view > Add an existing local Git repository to the view (Icons with green +)> Select your local repo > Right click on it > Import Projects...
I am now new to Github. I have a repository setup for a gwt project, both locally and remotely. Several versions of the project were developed with Eclipse, committed locally and sync with the remote repository.
Accidentally, I deleted the local repository together with the project from Eclipse. I recovered a copy of the project from a separately zip project-archive in Eclipse, and continued with developing a new version of the project within Eclipse, without using any repository (locally or remotely).
Question: How do I add the new app version to the repository as a new version, so that I can have access to the older versions and compare the files? I can clone the remote repository, but what's next?
You could:
Clone your remote repository to get a local one
In this new local repository, remove every files (only keep the .git directory at the root)
Copy everything from your new version, to the local repository
Check the diffs (git diff, gitk --all or git gui), commit what you want and continue working as usual
I am completely new to Git.
I am working on an eclipse project that uses GitLab. I would like to replace the current project I am using with one of the branches on the GitLab server.
I downloaded the repository as .git folder. Now I am wonder how I can completely change my current project with that .git project. Or if there any other way to do it with commands it would be fine as well.
You should checkout another branch using Git (either on command line or using some Git plugin for Eclipse), not by downloading anything.
git checkout another_branch_name
I currently have Fedora 17 inside a VM on my win7 computer. I want to configure the VM to manage my projects with git. I use eclipse helios on win7 with the egit plugin with my projects currently residing locally. Git and all the dependencies are already installed on the VM. The VM's hostname is dev.local and SSH is already installed, so I would use the following URL for access: ssh://john#dev.local:/php/projects/myframework.git
My question is, how do I initialize a new git repository on my VM and then push my local project up so that it's being managed by git in the VM?
OK, i finally figured it out. What I ended up doing was on my VM which is my Git server, was create my git directory:
# mkdir /home/brett/myproject.git && cd /home/brett/myproject.git
# git init --bare
On my client, in the project's folder (C:\www\myproject):
# git init
# git add .
# git commit -m "Initial commit"
# git remote add origin ssh://brett#dev.local/myproject.git
# git push origin master
I removed my client copy of the project and in eclipse, File > Import > Git > Project from Git, Select URI.
I plugged in the details to access the git repo on dev.local and was able to create a local copy in eclipse.
Anyways, thx everyone who took the time to reply to this. I actually found a decent article online which helped.
http://www.vogella.com/articles/EGit/article.html
run a git daemon in your vm. The git protocol would make it easier for you.