CSDN Code using Graphics Tutorial (detailed)

Source: Internet
Author: User

GIT+CSDN Code Simple Use Introduction

Tools:Git 1.9.4+csdn account

Git:http://download.csdn.net/download/u011620614/7522797

Follow the default installation of Git

One: Host the local project to CSDN CODE

To create a new project on CSDN CODE , remember not to tick " Initialize project with README file"( No subsequent Git Boot interface after selection )

After the creation into the Git Boot interface (the boot page here do not turn off , the following to use the account information inside)

Go to the local project root directory (I'm E:\example\here)

Right-click Folder blank location, choose Git Bash, go to Dos interface, follow the page guide there set your user.name and User.email Property

Note the --global parameter of the git config command , which is used to indicate that all of your git repositories on this machine will use this configuration. Of course, you can also specify a different user name and email address for a warehouse.

Add all the files under the project directory to the local repository (this time just joins the local repository and is not uploaded to the web)

git Add. added to the local cache, I have a folder here only test.txt a file

Git commit-m " submit Description "// join to local repository

Add a remote repository

Git remote add Origin [email protected]: xxx/xxx

The following git addresses can be found in items on the Web page

Do not commit at this time, because the public key has not been added, if forced to commit, will be rejected!

Generate local public key

First check the local public key:

$ CD ~/.ssh

If the hint is No such file or directory shows that you are using Git for the first time .

If this is not the first time, please do the following to move the old ssh key into key_backup (just afraid this key is still useful, General direct deletion is good).

$ mkdir Key_backup

$ CP id_rsa* Key_backup

$ RM id_rsa*

(I have a key here, first clear)

To generate a new key:

$ ssh-keygen-t rsa-c "Your email address"

If you fill in the password, you must enter the password when submitting, I do not set the password directly here

A . SSH file can be found in the user folder (the user currently using the computer ) under the Local system disk, where the id_rsa.pub file is stored as the newly generated SSH secret key.

Add local public key

Copy the contents of the id_rsa.pub and add them to the public key management on the Web page.

You can see the new public key when you save it (if you need to manage multiple projects, add the public key to your personal public key (inside the CSDN code personal Settings) instead of the project's public key, which is for the project only)

At this point, the contents of the local repository can be submitted to the remote repository

Go back to the project root and open Git Bash

Git push-u origin mster//push to the remote repository, set up the tracking branch, and the next push , just type git push . The system automatically tracks the remote master branch with the local master branch

Without error and displaying something like the above, it means that the local content project has been successfully hosted on CSDN CODE , and you can see the submitted content on the Web page item.

The local project has been successfully managed to CSDN code .

Local modification point and then submit, test the submission function

Right-click git Addall file now, and then choose git commit Toolto enter the interface similar to the SVN commit

You can see the changes, fill in the submission, click Submit, submit to the local warehouse

Open git Bashand enter git pushtocommit the local repository content to the remote repository.

You can see the changes and comparisons on this page.

To keep the local project up-to-date, use the git pull command to confirm local and remote code synchronization before each modification of the project.

If you want to manage projects on multiple terminals, it is recommended that you use the same version of Git, which may cause problems.

Second: Manage the project on multiple terminals

The first is also to add the public key (as in the above steps)

and clone your project from CSDN code.

git clone your project git address

This will allow you to successfully download and see your project on your local area.

Then you can do project management at this terminal, and the other commit actions are the same as the one that was first introduced.

Reference URL:http://blog.csdn.net/a352193394/article/details/9321555

Https://code.csdn.net/help/CSDN_Code/code_support/FAQ_2_1 (FAQ)

Attached : Git Commands

https://code.csdn.net/help/CSDN_Code/code_support/new_8

CSDN Code using Graphics Tutorial (detailed)

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.