git generates SSH Ksy for project management

Source: Internet
Author: User
Tags git client

1. First you need to have a git account, then create a New Repository on the website, fill in the name and build a warehouse, then there will be some warehouse configuration information ...

2. Then you want to download a git client, also can be msysgit, are also very useful client, installation will not say, Baidu will have

3. Then if you want your client to connect to your site's warehouse, you must generate an SSH key on the client and then copy it to SSH key on your website user.

4. When your git client is installed, the right mouse button will appear git a series of actions, if the Msysgit client, you can right click in the local repository will appear git Init here, there will be more than one. git

folder, which means that local git is created. Right-click Git bash into the git command interface, and you'll have to type some commands yourself to have the client generate SSH key.

5. Create the SSH key on the local client:


01.ssh-keygen-t rsa-c "Registered mail"//But the wording of this mailbox I am not sure, online some say anything, but I have not tried ...

Keep going back to the end and you'll see that the folder generated SSH key, and you can go to that folder to copy your keys, or you can use the Cat command to show it to your command line.

Save the SSH key you generated to the SSH key of your website and write the title casually.

02. At this point you can test if it's connected.

Type the command SSH [email protected] Then type Yes and you will see the message that your link was successful.

6. When your client git is connected to your user site, you can do version management, and when you want to do it you need to set up your username and email.

01.git config--global user.name "user name of your login site"

02.git config--global user.email "e-mail when you register"

03. At this point you are really able to manipulate the

7. After entering the command interface, add the remote address
git remote add origin [email protected]:yourname/yourrrpo.git//This is the address of the SSH protocol

Git remote Add origin https://github.com/lqzwork/Test.git//This is the address of the HTTP protocol

8. Right-click into the command in your warehouse

git status//view the state of the warehouse at this time

git Add. Before committing, Git has a staging area (staging area) that can be placed in a newly added file or added to a new
Changes. The commit change is the last change that was added to the staging area, not the change on our disk.
All files in the current working directory are added recursively.

Git commit-m "" (The semicolon is your description) or direct git commit//commit changes that have been added.

Git push origin master//your modified content will be uploaded to your user's website at this time, on your original master branch master

git revert head will then appear recovery information that needs to be entered again: WP to confirm//restore the image before the upload,

git generates SSH Ksy for project management

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.