您的位置:首页 > 编程语言 > Java开发

Share your Eclipse projects(Eclipse与Visual Studio Online的协同工作)

2014-01-27 20:37 706 查看




Connect Eclipse to Visual Studio Online to share your code with your team.

Connect to Visual Studio Online

If your team doesn't already have a team project,
create one.

If you haven't already, install the Team Explorer plug-in for Eclipse: http://dl.microsoft.com/eclipse/tfs.
Show me how.

Show the team explorer views.



You'll just use the team explorer here.



In the team explorer view, connect to Visual Studio Online.



Configure the servers.



Add the server.



Provide the URL to your Visual Studio Online account (http://[account].visualstudio.com).



Connect to the team project.



Share your code

In the package explorer, share your project.



Share your project in Team Foundation Version Control.



In the pending changes view, check the project in.



Go to the team home page.



On the code tab, you'll see your code.



Q&A

Q:Should I use Git or TFVC for my team project?
A:You can build your Eclipse projects in Visual Studio Online as long as your team project uses TFVC. If you use Git, you'll have to use you own build server. A
number of other factors, like the size of your codebase and the size and distribution of your team, may also impact which is best for your team.
Q:How can I share my code in a Git repository instead of TFVC?
A:
Set up a team project that uses Git for version control, then clone the Git repository and Git in Eclipse to share your code.

Enable alternate credentials

To use Git with your Visual Studio Online account, enable alternate credentials so that you can sign in from Eclipse.

Go to your team project's home page and open your profile.



Allow alternate credentials for this account.



Set the password for the user name that you use to sign in to Visual Studio Online.



Clone the repository

Show the Git views.



You'll use the repositories and staging views here.



If you don't have the Git views, you can get them by
downloading EGit.

Use the Git repositories view to clone the Git repository for your team project.



Specify the URL for your team project (http://[account].visualstudio.com/DefaultCollection/_git/[team project]).



If you just created your team project, the Git repository will be empty. That's OK.



Specify where you'll keep the cloned repository on your machine.



The repository for your team project shows up in the Git repositories view.



Push your code to the remote repository

In the package explorer, share your project.



Make sure you share it to Git.



You'll see how the remote repository is mapped to your working directory.



In the Git staging view, add your files to the Git index.



Push the source to the remote repository.



Your code is in your team project's Git repository now. You can open your team project's code page and see the code there.



Q:What if the Git views don't show up.
A:You can
download EGit to use Git with Eclipse.
Q:Where can I find the URL for my Visual Studio-managed Git repository?
A:It's in the team project home page, in the code explorer.

Open the code explorer on your you team project's home page (https://[account].visualstudio.com/DefaultCollection/[team project]).



With the repository you want to clone selected, get the URL.



转自:

http://www.visualstudio.com/get-started/share-your-eclipse-projects-vs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐