"Reprint" Visual Studio uses GitHub for code management

Source: Internet
Author: User

Objective

Always want to use git to manage their usual accumulation of small code, except for the work of the Code. Sometimes own a small code, in the company wrote, it will be a USB flash drive or a series of tools such as a copy, and then go home to continue to work on the original basis. Copy to copy to the trouble not to say, is prone to error, resulting in a very difficult to write a bit of code will not be found. And for the time being, git should be said to be the most NB and most widely used source code management tool, and many open source projects are now turning to GitHub. Often see the Garden brothers also come to learn git, for a rookie feel no hug git will have to be dumped again.

I am the source code management instructions under the WIN7 64-bit machine. The development tool is using VS2012.

Let's start by explaining the prerequisites required for the configuration process

1, GitHub website account if not on the https://github.com/this site registration can be.

2, Git Extensions http://code.google.com/p/gitextensions/downloads/list is a lot of, here can download various versions of the OH.

3, Tortoisegit http://download.tortoisegit.org/tgit/here to download the time to pay attention to distinguish between 32-bit system or 64-bit system.

4. Git Source Control Provider This tool can also be downloaded directly from the VS extension tool.

Next, start with detailed configuration instructions step-by-step. Say this configuration seems very simple, but the real whole is still more troublesome, specifically in this record, in case you can query later, or to learn git friends to provide some help.

GitHub account registration and Add Project repository

First step: Register your GitHub account

First go to the https://github.com/homepage, if you do not have an account, then you must register first. The homepage can be registered directly:

Enter this information, then click [Sign up for GitHub] to complete the registration, or simply click [Sign up for GitHub] to register more details.

Second step: After successful registration, first create a simple project warehouse.

Click to fill in the information

Continue to click on [Create Repository] to complete the project warehouse creation work, this will be used to save the following.

Git Extensions Installation

First step: Open Gitextensions233setupcomplete.msi, install, always next to as shown

Step Two: Check [install msysgit] and [install Kdiff] to continue next, then install Kdiff and Msysgit.

Step three: Start the installation of KDIFF3, the default is to successfully install KDIFF3.

Fourth step: Start the installation of Msysgit, also I here is the default is to complete the installation.

Then proceed to next, then the Gitextensions can be installed successfully.

Tortoisegit Installation

The first step is to open the installation file Tortoisegit-1.8.6.0-64bit.msi:

Step Two:

Step Three:

Fourth Step:

Fifth Step:

Complete the installation, and here are the default direct next to install successfully.

Gitextensions settings

The first step: click, if according to my above installation process will appear as shown in the interface

This is the only one that needs to be repaired, click [Repair]

The main is to edit the user name and user e-mail, and then click OK.

Step two: Generate key

According to the above operation prompt to the present interface

Click [Generate]

Save the generated key

Step three: GitHub binds public key

According to the steps 1, 2, 3, and then enter the key value, click on the following [Add key] to complete the binding key.

Git local Sync settings

git local clone, click on Git clone to display the interface as shown in the image on the right

URL input as shown in the address, the local directory according to the desired choice or create a new folder.

It can also be found here that [load Putty key] is disabled, so it hurts. Later on, Baidu finally found a solution.

Click the right mouse button, select the following settings

After you click Settings, you can reload Putty key with the following settings

Reload, and then click Confirm

Success, but temporarily no files on git, so the folder after cloning only. Git configuration file.

VS2012 Source code Management configuration

Create a new console application, and then on the Tools menu [extensions and Updates] to download git Source control Provider, restart vs after installation.

After restarting VS, in tool ==>> options ==>>source control==>> Select Source Control

Then in the local directory G:\GitTest add a project, I have temporarily created a console application to test.

Then synchronize the project to the GIT server under vs.

Add files adding file Commit commit file (to local) push push (to server)

In commit, there is an option to commit and push

After you click Submit and push, you can upload to the server by entering your GitHub account and password. After uploading, there is a hint like a small form, so let's take a look at the source code on GitHub.

http://www.cnblogs.com/aehyok/

Http://www.aehyok.com/Blog/Detail/73.html

"Reprint" Visual Studio uses GitHub for code management

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.