How native code on Windows Tortoisegit Learning Series is submitted to GitHub via Tortoisergit

Source: Internet
Author: User

Previous Blog

The above blog to explain how to install tortoisegit locally.

This article tells you how to submit your local code to GitHub via Tortoisegit. This article is suitable for beginners who have just contacted Git for source control, if there are mistakes in this article, I hope that the blog Park Daniel. thanks!

One: Add SSH Key

(1) Generate SSH key

The following are the things that Git bash runs

Generate SSH key: Start >

Run >git Bash

Enter ssh-keygen-t rsa-c "[email protected]", as shown, replace [email protected] with your own mailbox, all the way to enter.

(2) Copy SSH key

Execute command clip < ~/.ssh/id_rsa.pub in Git bash, at which point the key has been generated and copied to the Clipboard, and the copied SSH key can be copied to the TXT text file, which is later used

Two: GitHub

(1) GitHub adds the generated SSH key

Mouse click 1, select 2

Access to the GitHub Account Settings screen

Select "SSH and GPG keys" to add SSH key

SSH key is added successfully at this time.

(2) New Warehouse (repository)

Note: The warehouse, as its name implies, is the space on GitHub to store project files (source code, configuration files, database files, etc.).

Click Create Repository, the warehouse is created successfully

(3) Go to your personal repository and clone GitHub to your local computer

Cloning a github repository to a local

Copy SSH Address

Create a new locally stored GitHub repository file githubtest, and go to the directory, right-click->git here to build the repository (because it was cloned before, if the first pull code from GitHub, select clone)

After the creation is complete, you find a more. Git hidden folder

Pull the GitHub repository to a local directory, right-click->git Pull

Other URLs enter GitHub's SSH URL click OK

The files in the GitHub repository are now pulled to the local

Three: Tortoisegit code submission

Under the Githubtest folder, create a new Text.txt file (similar to the C # project file operation)

When selected, right-click to add the new Text.txt file to the local warehouse

Select the Text.txt file, right-click the following action, submit the Text.txt file to the local repository (note: This is only a local repository submission, GitHub does not have any changes, you need to push the local file to GitHub to complete the final operation)

Add log information

Click OK, submit to the local warehouse, after the successful submission, there will be a push option, the update of the local warehouse submitted to GitHub above, select push

The remote branch fills in master (the branch is the default branch when GitHub creates the warehouse), and the destination other URL addresses the GitHub SSH URL (described in the steps above)

Click the OK button and the local text.txt has been successfully pushed to GitHub

When you refresh GitHub you will find that you have successfully uploaded the Text.txt file

About deleting and updating file operations, it is easy to do not elaborate!

How native code on Windows Tortoisegit Learning Series is submitted to GitHub via Tortoisergit (graphic)

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.