Git Repository Eclipse Basics - eclipse

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.

Related

eclipse team explorer git jar files are not loaded

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.

Environment setup in GIT repository

Need small help related to the environment setup in a Git repository. Actually I created a Bitbucket account and I am trying to connect Eclipse and Git. But unfortunately I am not able to find Git in Windows. Could you please help me out on this?
I am using the Neon version of the Eclipse SDK.

Eclipse - sharing project directory with multiple users

We are trying to set up Eclipse so that two users can share the same project directory on our server. Is this possible? Every time we try, it creates a new folder and project.
Thanks!
Chris
No, this isn't possible. Eclipse only supports a single user accessing a workspace (not just a project) at a time.
Use a source control system such as Git or SVN to share code. Eclipse supports many such systems and has extensive sharing support in the 'Team' menus.
The best way to do this would be to use source control.
Sharing the actual workspace or the files with different eclipse instance is a recipe for trouble.
An easy way to do this would be to install git on your machine and also on his machine. Eclipse actually already has git in it ready to go so you probably dont need to install anything.
The one with the files locally will create a repo locally on his computer and commit the files to it.
Next you want to init a new empty repository on a shared folder and push your local chances to this as you would to github for example.
Your partner can then git clone from this repository to his machine and work locally.
Each of you will develop on your own copy and commit your changes locally. You will share your changes by pushing your commits in that central repo and pulling from it to get changes from your partner.
You could also just open an account on GitHub, GitLab or BitBucket (there are many others too) and use that instead of a shared folder. big advantage with these services is that they will be available from anywhere.

TFS Service - Can it be used with Eclipse AND Git

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)

How to setup SVN repository in XCode?

I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode and I see that I can either go down the path of using GIT or SVN.
In the past I have used SVN which is the reason I'm more inclined to go down this path (I'm open to using GIT if people feel it is better than SVN). My question is related to the setup of a repository in Xcode.
I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.
My question is 2-fold:
Please can someone advise on the steps to setup a repository through Xcode?
I notice Xcode requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?
Thanks in advance for any help or advice people can offer.
I think you should go with using GIT. You can create free repository on bitbucket.org
It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.
Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.
If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.
Steps:
Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
Install uberSVN.
Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).
If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.
If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.
There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.
SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see this on how to create a new repository for your existing project.
It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.
See e.g. explanation here https://stackoverflow.com/a/10039004/226086
Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".