How to clone mercurial repository created by eclipse plugin in other laptop? - eclipse

My colleague created mercurial repository by eclispe plugin(http://javaforge.com/project/HGE)(right click project root->team->share with->mercurial....) in hist laptop with ip address:192.168.0.111,the question is how I can clone his repository use same plugin in eclipse.

For cloning, you need access via either ssh or http (or some other mechanism provided by a plugin). If your colleague is running a Linux or OS X system, he could run an SSH server on his box and create an account for you, so that you'd be able to clone his repository over ssh. The easier solution, which also works on Windows, is for your colleague to run hg serve in his Mercurial repository (I don't know if the Eclipse plugin has an option for that), which will run the embedded webserver. By default, you should then be able to clone from http://192.168.0.111:8000/ (the hg serve command has options to run it on another port).

Related

Work with GIT on remote site instead of local

I have to work on a project that is on a remote GIT repository. I have a development environment accessible via ssh: I would use git on it, but I like Eclipse EGit package so I would know if there's a way to connect my Eclipse with the remote cloned repository.
Depending on the network, you might be able to mount the remote filesystem locally and use Eclipse to access the code. This will not be great on slow network.
Alternatively you can tar up the source and just copy it locally, then periodically copy to the server.
If you say that you have the development environment accessible via ssh then how will eclipse help you if it isn't in a development environment? Wouldn't you need to recreate your development environment locally as well?
You can install a remote desktop solution like NoMachine and run eclipse on the remote machine.
Please provide more details.

egit plugin for Eclipse

I have created a gitlab repository and followed the installation instruction by the letter and it was successful (i think... i can browse the repository online) and now I want to connect the egit plugin from eclipse to this remote repository.
I was using SVN for quite some time and now we need to switch to git and I am confused. egit only gives me the option to create a local repository but I'm a bit lost on how to push/fetch code to my online repository.
Any advice will be greatly appreciated :)
Thanks!
With Gitlab (working with ssh urls), that means you have to register your public and private ssh key in Egit first before being able to clone it.
See EGit ssh configuration
Then you can clone it.
And yes, you need to clone the full repo locally to work on it, that is the difference between a:
CVCS (Centralized Version Control System) like SVN
DVCS: Distributed Version Control System.
See "Sell me Distributed revision control" and "Describe your workflow of using version control (VCS or DVCS)" for more.
First you need to clone the remote repository using git clone <repository>, then you can import it to eclipse using egit
Or
You can use the clone functionality provided by EGit to clone the remote repo to local system

Setup a development environment git + centos + Eclipse egit on windows

I am setting up a development environment in my home. I have installed a centos linux in a virtual machine. All files in /var/www/html are shared with samba.
I have access to these files in windows. I have installed git in centos. I created a git repository in a sub directory of /var/www/html.
I am using Eclipse in windows. Egit is installed in Eclipse. I tried to add repository in eclipse but when I do a commit in egit, "git status" in linux displays a list of modified files to commit. Also when I do a commit in linux, all files in egit will be marked az modified.
I don't know how to synchronize egit with git. What is the correct way to do this?
The easiest solution by far would be to use a cloud service such as GitHub (or BitBucket if you want free private repositories).
An example workflow is (on terminal, however your clients will have GUI options for this):
$ git remote add origin git#bitbucket.org:username/repository
$ git push origin master
The on your other client fetch the changes and merge them in through pull
$ git pull
Both sides will need to have the same remote repository - This way you can push - pull wherever you do the work and the code be the same. I use this setup for developing and deploying my web-apps.
This solution relies on you having an internet connection - if you dont want or dont have an internet connection at your disposal then have a look at this post:
gitosis vs gitolite?

git server with eclipse project

I have a computer running Ubuntu Server. On this computer I have a user named mattgit.
I have another computer running Windows 7. I develop Java applications in Eclipse on this computer.
On my server, I have run "git init --shared --bare" to create a central repository for an Eclipse project. I've done this once for each project in my Eclipse workspace, each in a separate folder.
I want each project in my Eclipse workspace on my Win7 machine to act as a/be a/whatever the terminology is git repository. I want to be able to then push these files back to the central repository on my server. How do I do this?
I've tried cloning the (initially empty) central repository to my Win7 machine to a folder in my Eclipse workspace and then creating a project in there, but Eclipse refuses to create it because it says the directory isn't empty.
I've also tried creating the project using Eclipse in my workspace, then cloning the repository into that folder, but apparently I'm not allowed to do that either.
I've tried using SmartGit and the Git binary and I'm just getting more and more confused.
EDIT: Please assume I know absolutely nothing about what I need to do. I need step-by-step instructions.
You will need three things:
a Git listener service able to listen to your git command (and you don't need gitolite at all here: it is an authorization layer).
See GitStack for Windows (there is a free version)
a git Eclipse plugin including in your Eclipse in order to not switch context when you want to do a Git operation: make sure EGit is installed in your Eclipse.
some instructions importing your existing Eclipse project into a local git repo and to declare your Windows GitStack repo as a remote, in order to push to it.
Create a local repo and import your Eclipse project into it.
Add your remote and push to it.
The instructions of Egit on GitHub are quite complete.
The Vogella's tutorial on Egit is also nicely done.
The simpler way to do that is to create your new project within Eclipse, then right click on the project and go to Team > Share menu.
This interface will guide you to create a new local repository containing your new Eclipse project.
Once your project is managed on a local git repository, Eclipse will give you other context menu entries to manipulate the project on Git. So you will be able to push your commits on your remote repository (the one you created on your server).

Using Git With Eclipse Remote Systems Explorer

I am doing web development using CFEclipse with Classic Eclipse (Indigo) on a Windows Server.
I am using Remote Systems Explorer to access a Linux box via sftp.
The Linux box has Git installed. There is one branch in the development folder.
I have installed EGit in Eclipse, but there are no provisions for working with a remote system.
Because I cannot develop locally, how should I checkout files, edit and review changes in a browser, and ultimately commit properly? There is no local repository and checking out files through ssh (putty) while editing them in Eclipse does not show my changes when browsed.
If you can access to the remote location through ssh why you don't just simply clone the repository in local and then pull and push the changes ?
I think that cloning the the repository is the best bet in your situation, you have only to install msysgit on your windows machine ...
You can use remote project to achieve what you need. Unfortunately, git operations need to be done on the remote server. But, you can change the files and the files will be changed remotely on fly. To create the remote project you have to right click on the remote folder you want to create the remote project. The context menu you will find "Create Remote Project".
What Eclipse will do is make the modification thru RSE. This means, eclipse will deal with save files remotely.