Eclipse- connecting to svn repository - eclipse

I downloaded the SVN plugin for eclipse and I am now having trouble connecting to the repository I need. I have the URL that I should be adding (it works on my school's computer). However I don't think it is doing what it should be. I included a picture that shows the pop up window when I try to add a new repository on eclipse. It is creating a folder inside of my eclipse folder in applications when I attempt to add this. The dialog on this window looks different than the one that comes up at school. This particular window will only let me select "file system"? I believe that is just creating this repository on my own computer? What do I need to do to connect to a remote repository?
http://s23.postimage.org/e4s7iso7f/screen_capture.png <- pic here

Please follow these steps:
Window, Open Perspective
Select "SVN Repository Exploring"
Once you are there, if SVN Repositories is not showing, go to Window,Show view, and select "SVN Repositories"
Now right click on the empty area of the SVN Repositories to have the context menu show up
Select "Repository Location"
Enter the URL and a label of your choice
Enter username and password if necessary and click "Save authentication"
Click Finish
I suspect that you are selecting "New Repository" instead of "Repository Location".

Related

How to select repository for staging view in Eclipse Luna 4.4?

I'm not able to find a solution to a documented bug in Eclipse (Luna 4.4). I've cloned a git repository from Github into my eclipse workspace view and imported the associated Maven project into my project space. When I then display the staging view in Eclipse, it appears, but says "No Repository Selected" up top. I'm therefore unable to drag any changed files into the staging area and commit them. How do I associate my cloned repository with the staging view?
Try enabling linking between the Git Staging view and other views. You do so by pushing the "Link with Editor and Selection" button on the top right of the view, to the right of the "Refresh" button.
In the top image, the view is not linked.
In the bottom image, the view is linked and the button appears "pushed"
"Enabling linking between the Git Staging view and other views" didn't help in my case. I also tried deleting branch and checking out again. Nothing worked.
What I did was:
Right click on any of the modified file -> Team -> Commit.
Somehow it worked and I could see all modified files in unstaged changes.
I had the same issue. This is what worked for me
- Under the 'Package Explorer' Right click on the your project
-> Team -->Share Projects...
-> Then in the list of projects, select your project
* Seems weird, but sharing back to itself resolved this issue for me
Good Lucks
click on git icon,
select the repositorie you want to use
right clik to show the menu
then select "show in"
then select "git staging"
Maybe you are missing one step. If you have a local repository already:
1. On "Quick Access" of your Eclipse search Git repository
2. Select Team option (Right click on project -> Team) and select Share Project, mark Use or create...and select .git directory of your project cloned.
3. Select Team option and now select Add Index
4. Select Team option and now select Commit, you will see Git View now has your project with the correct branch.

How do I rename my local git repository

I've renamed my remote repository and created a new local repository from it. How do I change it within EGit in Eclipse?
Previous answer list below also has issues. The only solution appears to be:
Backup .project, etc. files
Delete existing project
Import existing local git repository as a "general project"
Put backed up files into the new project
Restart Eclipse
Rename, per se, is not the actual operation -- changing repository is the correct mindset to solving the problem according to a coworker.
Select 'Team->Disconnect'
Select 'Team->Share' On 'Share Project' dialog
Select Git and click Next
Unselect 'Use or create repository in parent folder of project'
Select the new local repository
Checkbox the project name showing correct current location and target location
Click 'Finish'
Eclipse will move existing files from previous local repository to the new local repository.
I just renamed a repository. I use LiClipse, an Eclipse variant which includes EGit. I believe there is no way to do this operation with the EGit UI. Here's how I did it outside of EGit and Eclipse, without confusing them.
In the Git perspective, right-click on the repo, and select Remove repository from view... from the pop-up menu.
A dialogue box offers to delete the repository from the workspace. I interpreted this to mean, delete the repo directory and everything in it from my disk. Press the "No" button.
In the programming language-specific perspective (PyDev, in my case), right-click on the project, and select Delete... from the pop-up menu.
A confirmation dialogue box appears. In this case, I interpret it as just confirming that I want to remove the project's entry from the project list in that perspective. There is a checkbox, "Delete this project from workspace?". Leave that checkbox unchecked. Press the "Yes" button to confirm.
In the finder or command-line, find the repository directory, and change the directory name to the new name.
Return to Eclipse, and the Git perspective.
Select menu item, File... Open projects from file system.... (There is also a small icon with a "+", above the projects list, with tooltip "Add an existing local Git repository to this view". I believe it is different but equivalent.) A dialogue box appears.
Select the (renamed) repository directory. Click Next or Finish to complete the wizard. The Repository appears in the list of Git repositories in EGit.
Return to the programming language-specific perspective appropriate for that repository.
Select menu item, File... Open projects from file system.... A dialogue box appears.
Select the (renamed) repository directory. Click Next or Finish to complete the wizard. The Repository appears in the list of Git repositories in that language-specific perspective.
The project-specific Eclipse settings appear to be stashed away in a file .project within the repository, so they are not modified by the rename happening overhead.

'remote add' in netbeans 7.4?

I am working on a fork that I created from a project on Github. I now want to merge changes in the project to my fork, using netbeans.
I read on this page that I need to "remote add" the project to my list of remotes.
However, I cannot find a menu command to do so. Is there one?
In case there is not:
I can of course start a new netbeans project with the main project instead of the fork. But what is the best practice to merge those two then?
In NetBeans 7.4 it looks like you can't just click "remote add" from a menu. It seems you can persist a new remote if you click Remote -> Push and go through the wizard. See also: https://netbeans.org/bugzilla/show_bug.cgi?id=191540

How do I add an Eclipse java project with EGit to Github?

I have created a repository on Github and have the project in my Eclipse. I also have the Egit plugin and Github plugin. I've looked all over the internet for help on this, but I at last must turn to the Stack Overflow community.
How do I add my java project from eclipse into my repo on Github?
There are a few tutorials out here on how to import projects from git into eclipse.
Though, you can follow these steps:-
Choose the "Git" Perspective, from Window->Perspective->Open Perspective->Other, and then search for Git and select it. This opens the Git repositories view.
From the "Git Repositories" view , choose the option which says "Clone a git repository and add the clone to this view."
Follow the wizard, enter all the details.
Choose the branches you want to import.
Choose the local directory, select clone the sub-modules.
You can choose to import all existing projects by checking the box against "Import all existing eclipse projects", now or you can selectively import projects later. Hit finish.
The git repositories view will now show your repository.
Now you will need to import projects from this repository, only if you havent selected the "Import all existing eclipse projects" box before.
Right click on your repository from the Git Repositories view. Select "Import Projects" option.
Check the radio option, "Import existing Eclipse projects", select the project from your working directory. Click next and then hit Finish.
The Project Explorer should now be showing your project listed there and the name of the branch in square brackets.
Make changes, add files, edit files, once you are ready to make your first commit. Right click on your project under Project Explorer, select Team->Pull.
If this is your first commit, it will say Nothing to update - everything up to date. Hit Ok. Otherwise, it will download the changes, if there are merge conflicts , it will show you those. There are other tutorials which will guide you through dealing with merge conflicts.
Right Click again on your project, select Team->Commit.
This opens a Commit Changes window, leave a meaningful commit message.
Select Commit and push.It should ask you for your username and password, you can check the box, which says store these.
Should show Pushed to origin with Message Details. Hit ok, and you are done with your first commit.
Select a project. Right click, Team->Share. Select the Git provider. Follow the wizard.

How to properly use EGit with Eclipse

The only way I seem to be able to get use git in eclipse is to create a non-git project then turn that into a repository. This ends up moving the project out of the eclipse workspace on the file system. I then have to delete the project(it's still in the git repository), then import a git repository after creating a branch and clone it to get it back into the eclipse workspace.
Is there a simpler way?
I simply want to create project that is really a clone from a local repository. Essentially I have two copies on my HD but I can commit the eclipse project to the git repository. Unfortunately there has to be a better way?
To answer this question involves three steps.
Create a external (remote) repository
Share the project in a way that it remains in the workspace
Connect the project repository to the remote repository
Create a Remote Repository on Your Local Machine
Switch to the Git perspective. Click on Create a new Git Repository.
When a dialog appears select a directory where you would like your remote
repository to be. This is were your project will be pushed to. You will also
want to select the Create as a bare repository option.
That's it for this step. You should now have this repository in your EGit
repositories list.
Sharing Project within the Workspace
There are two ways to share a project so that it remains in your workspace.
1. Make the project directory a repository
2. Make the whole workspace directory a repository
The Project as a Repository
The first option option is not recommended by the Eclipse team. This issue is
described in more detail at Why is not recommended to have an Eclipse project folder as a Git repository?.
The basics of the issue are twofold:
You can't have more than one project per repository
If some thing happens to your workspace you'll lose your repository too
Issue 1 isn't solved here. Issue 2 can be solved by connecting to a remote
repository as show later.
To share the project as a repository:
Right click on the project
Select Team -> Share Project... from the popup menu
Click Use or create repository in parent folder of project
Select the project from the list
Click on the Create Repository button
Click the Finish button
Next you'll want to connect your newly created repository to the remote repository.
That's covered below.
The Workspace as Repository
The second options allows multiple projects to be added to your repository.
In fact any new project you create will automatically added to the repository.
Automatically adding projects can cause some issues.
One issue is that, if there are changes in multiple projects, staging
those changes can take a bit of wading through. Using a Tree presentation when
staging can simplify things.
Another more serious issue occurs when importing a git clone of a project into
the workspace. This importing will create nested repositories. Nested
repositories can cause problems
according to this post.
By default Eclipse doesn't import the git clone of the project into the workspace.
To share the workspace as a repository:
Right click on the project
Select Team -> Share Project... from the popup menu
Click on the Create button
Select your workspace as your Repository directory
Click the Finish button
Once your repository is created you may want to do a little house keeping. I suggest
adding the RemoteSystemsTempFiles project to the .gitignore file. Note: the
.metadata file is added automatically by Eclipse.
You can ignore the RemoteSystemsTempFiles by:
Switching to the EGit perspecitive
Selecting the workspace repository from the list of repositories
Select the Git Staging tab
Click on the View Menu button on the right side the the tabs toolbar
Select Presentation -> Tree menu (folders are easier to ignore form the tree view)
Right click on the RemoteSystemsTempFiles project
Select the Ignore Folder menu
Ignore other projects in the same way
Connecting to the Remote Repository
The last stage is connecting the workspace repository to the remote repository
we created earlier. Once you've switched to the EGit perspective:
Expand your workspace respository
Right click on the Remote node in the tree
Select the Create remote... menu
Leave the remote name as origin
Select Configure fetch
Press Ok
Click on the Change... button
Click on the Local File button
Select the bare repository that you created in the first section
Click Finish
Click Save and Fetch and then Ok
You can then stage, commit and push changes in your projects and workspace.
When you first commit and push EGit will push the default branch master
to the remote and configure pulling this branch from remote repository.
Follwing the User Guide, you would need to create the .git repo within your current project path:
If the .git path is within the current project path, there is no reason EGit moves your files anywhere else.