GitHub + tortoisegit

Source: Internet
Author: User
Tags git commands

Visit http://hi.baidu.com/tp100/item/b48debf7f6fa8909d99e7253.

Tortoisegit

Although it is necessary to use git commands to completely experience the powerful features of git, tortoisegit may be more friendly to those unfamiliar with the command interface, and can have a good balance between functionality and ease of use.

Tortoisegit can be downloaded here: http://code.google.com/p/tortoisegit/downloads/list. Choose to download 64-bit or 32-bit versions based on the system type. Download the 64-bit or 32-bit version, install it, and restart the system.

After restarting, install msysgit at http://code.google.com/p/msysgit/downloads/list. Download Full installer for official git 1.7.6 or the latest version. After this is installed, tortoisegit can be used normally.

Create a git Project (init) and store modifications (COMMIT)

First, right-click an existing project folder or a new folder and select git create repository here .... This creates a new git database to store the original code. When the GIT init dialog box appears, do not check make it bare and click OK. After that, you can see a hidden. Git folder if you have enabled the folder to display hidden files.

 

 

After the GIT database is created, set the author information. Right-click the folder and choose tortoisegit> Settings. Go to the git-> config page, enter your name in name, and enter your email. Click OK.

After saving the original code, right-click the folder and select git commit-> "master ". Master refers to the current branch. If there is a sequel to this tutorial, I will explain it again.

When the commit window appears, enter the comment to store the change in the message. Good developers generally describe the newly added or changed content of this change here. Enter a message and check the file to be saved. To store changes in all files, check select/deselect all. After that, click OK. After the storage is complete, click Close to close the window.

CreateGitHubAccount


 

The next step is to create a GitHub account: https://github.com/plans. If you want to use the free solution, click Create a free account. Enter user information and press create an account.

After the account is created, click New repository to create a source code library. Enter the project name and press create repository.

After the project is established, copy the link to the source library, such as the git@github.com: vvasabi-test/test-project.git. Return to the project folder, right-click and choose tortoisegit-> Settings.

In this window, select Git-> remote, enter origin in remote, paste the copied link in the URL, and click Add new/save. After that, press OK.
You only need to perform these steps once for each project.

Upload modification content (push)


 

Now upload the modified content to GitHub. First, create an authentication key. Choose Start> All Programs> tortoisegit> puttygen. Click Generate, wait for the program to run, and then click Save private key to save the key to any location. If you need to ensure that the key will not be stolen, you can enter the key passphrase before storage to use the password to protect the key (the same password must be entered in confirm passphrase ). If you do not enter the password, you can click "yes" when puttygen warning appears.

After the key is saved, go back to the Start menu and start all programs-> tortoisegit-> pageant. In this case, the Status column will run out of a new icon. Right-click the icon and select Add key, and then select the key you just saved.

 

Return to the putty key generator window and select and copy the public key. Open the GitHub page and click Add your public key. Click Add another public key, enter a random name in the title column, and paste the key in the key column. After that, click Add key.

Although it is difficult to set the key, the good news is that a computer only needs to be set once.

Return to the project folder, right-click, and choose tortoisegit-> push .... Tick push all branches, click OK, And the putty security alert time point is yes (this will only appear once ). If no error warning is reported, the project is successfully uploaded to GitHub.

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.