Eclipse Mercurial Plugin 2 computer - eclipse

I want to use MercurialEclipse to share my files between my mac and my windows computer. I installed the plugin on both and tried to commit+push the files from the mac into a repository of googlecode. Now I am trying to pull the files from the googlecode repository onto my windows computer. But it won't work, there aren't any files in the wizard.
Can anyone help me?

You need to first clone the repository on the target computer, hg clone. Sometimes I just copy the .hg directory (and down) from the source's root to where I want to create the new clone. In particular I've done this for creating the repository on a central server.

Related

After a force linux backup and reinstall, connect to a git repository again

i need your friendly help :), i just had to restore my linux distro due to it crashed, before that, i backed up all my projects folders and files. Now i have i completely new Linux installation and i want to connect again to github from my project folder but all project for github is new, i mean when i try to pull something the system says that i have untracked files and it has to be commited, i don't really want to push all my project again so (here the question), is it possible untrack those files for my local repo and continue working as if i've never restored my linux back?
Thanks to all can help me to learn this.
Regards
Anjrot

Local GIT server and Eclipse

I've worked with SVN all my life and, right now, I'm trying to learn a little about GIT. In order to do so, I have created a local private GIT server in a RaspBerry and connected it to my Eclipse.
Until now, I have created a folder in the raspberry (/home/pi/raspberry-repo.git/ ) and formatted it as a GIT repository ( git init --bare ) creating the following directory structure:
I have also successfully connected Eclipse via SSH to such repository but I have some question that may be conceptual in nature:
I already have 2 local projects in Eclipse and I have executed the Team>Share Project in them, in order to add them to the LOCAL repository in my PC. After that, I have made some commits in both projects to such local repository and pushed the changes to the remote repository in the raspberry. My doubt appears when I look the GIT perspective in Eclipse.
In SVN the usual structure is:
but in GIT the structure seems to be this:
So, AFAIK in order to download a project from a remote repository I must File>Import>Projects from GIT, select the branch and the project in such branch.
Is all this correct?
Should I use just one project per repository? (Create a folder in the raspberry for each project )
Another question is why I'm unable to see any proper file from my projects when I browse throught the Raspberry filesystem (I just see a new folder inside of the Objects folder for each commit). The repository is not stored in plain text... Is that normal or I'm making some mistake when configuring the repository folder in the raspberry?
Hope you have patience with this doubts! By the way, any GOOD tutorial is welcome (the ones I have found aren't very good)

How to use Egit with ssh

I have always used gitHub as my repository but now I decided to store my source code into my local server (Ubuntu 14.04).
I use Eclipse as IDE and to make it working with git I installed Egit plugin.
My objective is to have a centralised repository in my local server at 10.3.16.1 and use my desktop pc and my macbook to push and fetch data from it.
My existing maven spring web based application sits at the moment on my laptop (eclipse)
I created a local git repo and then I added and committed all files. (so far so good)
Afterwards, I created a new remote as follow
I then pushed the master branch to the server but despite it says that the process has been successful I cannot clone the entire source code from my pc but only metadata like commits etc but not source files
Any thoughts on this?
Thanks
I managed to solve this problem on my own.
Apparently Git does not store source files in the centralised repository but only objects.
In order to import all source files I did the following on my PC
In eclipse File-> Import-> Git-> Project from Git
Then I selected Clone URI
I filled the location of the repository as follow
Eclipse retrieved successfully the master branch
Set the local destination of the new repository on my pc
And then I imported all sources accordingly as follow
Then I added the project to my working set
Hope this can be of help

How do I retain git history and project location in eclipse on windows when moving from 2 drives to 1?

In my previous eclipse setup I had the workspace and git repositories on the D drive. I've chosen not to partition the new drive and have copied the old workspace and git repository folders to the C drive.
After a fresh install of kepler I've found that the projects not under git moved ok while the one under git didn't. The properties of this project showed a location of drive D, while the other projects showed the new location of drive C.
I'm using egit bundled with eclipse. I've tried importing the project but this loses git history. I would like to retain git history as if the drive move never happened. I'm using a remote repository and can pull from that, but that doesn't keep my local history.
Since I chose the workspace to be the C drive rather than the D drive eclipse was path relative and picked it up for the non-git projects. But for git projects it looks like eclipse is using an absolute path, and hence the issue with project location.
I can swap drives around to get back to the old setup if needed. Any suggestions that will allow me to move the project as if the move never happened?
Just remove the projects from the workspace (without deleting content), and then import them from the new location (using Import > Existing Projects into Workspace). After that, if the projects are not yet connected to the Git repository they're in, right-click them and select Team > Share Project....

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).