We have just moved from svn to git, hosted at Microsoft for Visual Studio.
I'm the only developer here using Java in eclipse. I installed the Team Explorer Everywhere plugin and am able to clone the repository. But the jar files inside the libraries are shells of their former selves, only the following meta-data:
version https://git-lfs.github.com/spec/v1
oid sha256:9d3agy7ae0a5be64b38f6e019a8ed6dca4bf60e4882178007qdf1c237dd78b4b
size 722914
I have heard that I need to set (or install) LFS (Large File Service), so I downloaded and installed git-lfs-windows-v2.5.2.exe. No change in the jar behavior.
If anyone out there knows how to tell Team Explorer Everywhere to turn on LFS, I would appreciate some guidance. Thanks.
OK Folks, I have unblocked myself by cloning the repository again and abandoning my previous clone. Apparently, either one of the installs I did changed the LFS behavior or the repository wasn't fully configured at the time I did the first clone. Takeaway: check your jars after cloning and before making code changes.
Related
I am a student who has just started programming and have to create a project with a team of students. We are trying to find some kind of solution to code and have our work synced across everybody's workspace. Some are using linux, others windows and some mac. I have tried to understand the whole "Git" repository but am struggling to set up the basics. We are all working on eclipse and have installed the EGit but now are stuck how we set up the communal folder. I tried setting up an account on bitbucket but can't find out how we are meant to link eclipse workspace to the online folder? Any help would be appreciated! Thanks
If you plan to use Egit and bickbucket, consider cloning your remote repo to a local folder on your file system.
Here is a link describing the cloning procedure:https://wiki.eclipse.org/EGit/User_Guide/Remote. You should be able to find the URI to use for the repository on bitbucket.
Recently I tried out the new TFS-Service, and really liked the built in Scrum template for project management, and the new ability to create a team project managed with Git.
It would seem that the Git integration is only possible when using Visual Studio on windows though. Using Eclipse (with the Team Explorer plugin) I was unable to work with a git-based team project.
Is this really the case?
Heres what I've tried:
In TFS Service, I have a git-based team project with some commits in it.
In Eclipse, I connected to the team project, but it seems I can't pull or even see the source in any way. Source control explorer doesn't show any code (or any paths even).
In TFS, I created a new git-based team project. In Eclipse I created a new project and used Team -> Share... to try and get the code into TFS. But selecting TFS there doesn't seem to have the disired effect: it doesn't understand that it's a git-based team project, and so it doesn't try to push the code with git, but upload it to a new path ($/some/path/here/).
So is that it, or perhaps there's a workaround? Maybe I did something wrong?
BTW - I know about using TFS with git-tf, and I'm OK with that option, but it's not what I'm asking.
Thanks.
We're working on improving this for the next major version of Team Explorer Everywhere (TEE), but this is what you'll want to do today.
Eclipse already has a full featured Git version control provider in the eGit plugin. This is installed in many versions of Eclipse but if you do not have it you can install it from here:
http://marketplace.eclipse.org/node/1336
To use eGit today against the hosted service you must enable alternate credentials in TFS (click on your name in the top right corner, My Profile, Credentials then enable and configure your credentials).
Once this is enabled you can point eGit at your service account repo and you are good to go. In the Import or Share wizards pick Git and then follow through th eGit dialogs.
When you make a commit, if you add #123 into the work item comment it will associate the commit with that work item number when you push it to the server.
Now, I mentioned that we are trying to make this better. What we are aiming to do is show you both your TFVC and your Git related projects when you import and share and if you have picked a Git repo then we'll help you get your credentials set up, clone it and get the version control parts of Eclipse hooked up to eGit (assuming you have eGit installed). We'll also make sure that the other Team Explorer Views (such as work items, builds etc) all work great and that links to Git commits etc do the right thing. Hope that makes sense - but if anyone wants to talk more about how Git projects will work in future versions of Team Explorer Everywhere then feel free to drop me a mail (martinwo#microsoft.com)
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).
After spending a decade with SVN I've finally taken the plunge with Git. I have set up Git, Gitolite and GitLab on a server and have successfully added code to my local repository, committed, cloned repositories and pushed code back to repositories. So far, so good. Now enters EGit...
I have cloned a repository using the Git Repository Exploring view using the following syntax for the path:
ssh://dexter:vaultanalyser.git
(In GitLab, repositories are referred to as projects, so I assume that I am supposed to have one repository per Eclipse project? Rather than a SVN-style single parent repository that contains multiple projects?)
This imports the repository into:
/Users/mattpainter/git/vaultanalyser
I was expecting this step to automatically create an Eclipse project for me with all the source, but this isn't so. I tried fudging the target directory so it's in my workspace, but this isn't working either.
How do I get the cloned source available within Eclipse? This site implies that if you create a project with the same name as the repository, it all magically works, but this isn't the case (yes, I know the article is about Github, not GitLab, but I figured the two were close enough for the task at hand).
I've then tried creating a project in Eclipse and sharing it - but then the whole project appears as a sub-folder in the repository. If repositories are indeed analogous to projects, this isn't really what I want.
I've looked through other StackOverflow topics that look related, but I fear I'm still missing a key piece of understanding with how this is supposed to work and it's all looking remarkably convoluted thus far.
Help?
In GitLab, repositories are referred to as projects, so I assume that I am supposed to have one repository per Eclipse project?
Yes, but a GitLab "project" isn't necessarily an Eclipse one.
It doesn't have to follow an SVN structure, as illustrated in "Eclipse reference directory outside eclipse project directory but within repository".
All you need to do is to create an Eclipse project, specifying the source directory being not in the default path (Eclipse workspace), but wherever you cloned your repo (as described in "Getting started with Eclipse + EGit - confused").
That way, the eclipse project you just declared (and referenced in the Eclipse workspace) has its files (.project and .classpath) at the root of the Git repo.
And Egit can then manage that project just fine.
Or you can import it directly with Egit: "Eclipse + EGit: clone project into workspace".
As the OP nullpainter reports below:
The original issue was compounded by invalid permissions in the .git/objects folder on the server.
Running a chmod git:git -R * on the folder solved the issue
He details the right setup below.
To expand on #VonC's answer, the steps to get EGit and Eclipse to play nicely is:
Select 'Clone a Git repository' from EGit, accepting all defaults. This will create a folder in a git parent folder, somewhere outside your workspace.
Create a new Eclipse project. I'm using Java, but I assume there are similar steps for other languages. On the first dialog, untick 'Use default location' and instead select the repository folder created in step 1. Accept all defaults.
Select Team > Share Project... from your new project. Select Git, and tick the 'Use or create repository in parent folder of project'.
Now you can push your code and Eclipse dot files to your git repository from within Eclipse.
(My original issue was compounded by invalid permissions in the .git/objects folder on the server - running a chmod git:git -R * on the folder solved the issues)
I check it out with the command line - then build my projects on top of that. In fact, I end up doing most operations with command line git. EGit is useful for viewing the diffs but I find command line has more power and control. Git is mostly about giving devs lots of power and control.
I have an eclipse project on my hard disk, which is a fairly recent check out from an SVN repository. I've imported this project into my Eclipse workspace, and now want to associate it with the SVN repository.
How do I do this? The only options I seem to have under Right-click -> Team is "Share Project", which only seems to allow me to do an initial import.
Edit: Motivation - It's a largish repository, and I don't really want to have to import the whole thing over the network.
Edit 2: There are (for some reason) no .svn dirs in the project. So maybe a fresh import from svn is the only option
Team->Share project is exactly what you need to do. Select SVN from the list, then click "Next". Subclipse will notice the presence of .svn directories that will ask you to confirm that the information is correct, and associate the project with subclipse.
I just wanted to add that if you don't see Team -> Share project, it's likely you have to remove the project from the workspace before importing it back in. This is what happened to me, and I had to remove and readd it to the workspace for it to fix itself. (This happened when moving from dramatically different Eclipse versions + plugins using the same workspace.)
subclipse not showing "share project" option on project context menu in eclipse
I'm asked this question very frequently, if it's smart to use "Share project..." if a eclipse project has been disconnected from it SVN counterpart in the repository. So, I append my answer to this thread.
The SVN-Team option "Share project ..." is totally fine for projects that exist in SVN and in your Eclipse workspace, even if the Eclipse project is missing the hidden .svn configuration. You can still connect them. Eclipse SVN-implementation (Subclipse/Subversive) will verify if the provided SVN http(s) source is populated. If yes, all existing files will be copied and linked (checked out in SVN terms) to your very personal Eclipse workspace.
Word of caution:
Do a backup if you depend on you local files. The SVN implementation may vary its behaviour with every release.
If you have multiple projects encapsulated within each other, make sure you point the SVN path to the correct local path.
regards,
Feder
I came across the same issue. I checked out using Tortoise client and then tried to import the projects in Eclipse using import wizard. Eclipse did not recognize the svn location. I tried share option as mentioned in the above posts and it tried to commit these projects into SVN. But my issue was a version mismatch. I selected svn 1.8 version in eclipse (I was using 1.7 in eclipse and 1.8.8 in tortoise) and then re imported the projects. It resolved with no issues.
I am using Tortoise SVN client. You can alternativley check out the required project from SVN in some folder. You can see a .SVN folder inside the project. Copy the .SVN folder into the workspace folder. Now remove the project from eclipse and import the same again into eclipse. You can see now the project is now associated with svn
In case of SVN servers you have to creating a central repository with all projects. The contents of the repository can be uploaded with the Team/Share command; in case of the Subversive client it automatically runs a commit after the import, so you can upload your files.
This step cannot be circumvented in any way using a centralized version management system such as SVN.
Try this- Close the project then open it. It links with svn automatically,if project was checked out from valid svn path.