How do the VisualStudio Connect to Git@OSC

You can follow the steps below:

1. Apply for a git@osc account

2. Install GitExtensions(http://sourceforge.net/projects/gitextensions/files/latest/download)

3. Install Git Source Control Provider in the VisualStudio(I'm using the VS2013). "Tools -> Extensions and Updates",

How do the VisualStudio Connect to Git@OSC_第1张图片

 

4. Open the Git Bash to generate SSH secret key, enter "ssh-keygen -t rsa -C "some strings"", don't ignore case.

How do the VisualStudio Connect to Git@OSC_第2张图片

The file path and passphrase had better be empty, you'll need to enter it when you establish SSH access if the passphrase's not empty. Then find the id_rsa.pub file in c:\user\administrator(or your PC username)\.ssh and open it with Notepad, select all and copy to clipboard.  

5. Add the SSH key in git@osc.

How do the VisualStudio Connect to Git@OSC_第3张图片

 

You can check whether to add successfully in Git Bash, enter ssh -T [email protected]

How do the VisualStudio Connect to Git@OSC_第4张图片

 

6. Generate SSH key for PuTTY. Open your VisualStudio,

How do the VisualStudio Connect to Git@OSC_第5张图片

How do the VisualStudio Connect to Git@OSC_第6张图片

select the file "id_rsa" you generated just now

How do the VisualStudio Connect to Git@OSC_第7张图片 

then save private key

How do the VisualStudio Connect to Git@OSC_第8张图片

How do the VisualStudio Connect to Git@OSC_第9张图片

7. Create a new project in git@osc

How do the VisualStudio Connect to Git@OSC_第10张图片

 

8. Create a new solution in your VS, and then create git repository

How do the VisualStudio Connect to Git@OSC_第11张图片

 

9. Configure remote repository

How do the VisualStudio Connect to Git@OSC_第12张图片

copy remote git SSH address

How do the VisualStudio Connect to Git@OSC_第13张图片

How do the VisualStudio Connect to Git@OSC_第14张图片

Don't forget to add the ppk file. Now you can click Load SSH key and test connection, then save changes.

 

10. Test commit and push. If you want to see the git icons, just like mine

How do the VisualStudio Connect to Git@OSC_第15张图片

you need to select "Tools => Options => Source Control"

How do the VisualStudio Connect to Git@OSC_第16张图片

Click "Commit",

How do the VisualStudio Connect to Git@OSC_第17张图片

How do the VisualStudio Connect to Git@OSC_第18张图片

After you commit and push your code changes, you and see them on git@osc.

How do the VisualStudio Connect to Git@OSC_第19张图片

 

If you want to delete all stuff of the project, you can do like the following:

How do the VisualStudio Connect to Git@OSC_第20张图片

How do the VisualStudio Connect to Git@OSC_第21张图片

Enjoy yourself with git@osc!

你可能感兴趣的:(How do the VisualStudio Connect to Git@OSC)