Synchronize the local code library with Github

Source: Internet
Author: User

Synchronize the local code library with Github

Installation and initialization

Download the software here. All default settings are used to download gitbash during installation.

Run the Git Bash generated on the desktop, there will be a command box, the following settings ssh-keygen-t rsa-C "" will prompt the location of SSH Public Keys, the default is good, press Enter. The next step is to Enter The password twice. You can set a blank password. Press Enter twice. The key fingerprint is: indicates that The Key is generated in C: \ Documents and Settings \ UserName \. the file under ssh \ saves the public key. Log on to Github, click Account Settings-SSH Public Keys-Add another public key, and enter the Title in the Key field. Enter all the content in the generated file; next, enter the ssh-T in Git Bash to test the connection; Are you sure you want to continue connecting (yes/no )? Enter yes. The next two rows are personal information Settings (saved in the C: \ Documents and Settings \ UserName \. gitconfig file)

git config --global "username"git config --global ""
Create and upload a project:

Log on to the home page of the Github website, create a repository, and create a local folder to synchronize the code library.

Git init input this git add. add all files (just prepare them locally, pay attention to the ". "represents all files) git commit-m 'version 1.2.3 'is enclosed in quotes indicating the information git remote add origin boliquan/wp-code-highlight.gitgit push origin master upload steps to this done
Modify and upload local files

If the content is added, git add first.

'Git commit-a-m' version 1.2.3 ''modify (local) 'git push origin master' // modify (server), go to 'github 'and find that the modification has been made.
Create a tag:
Git tag-a 1.2.3-m 'version 1.2.3 '// The quoted git push -- tags // you can view the created tag on Github.
Delete a tag
Git tag-d 1.2.3 // Delete this tag (local) git push origin: refs/tags/1.2.3 // Delete this tag (server ), the tag on Github is missing.
Download a project from the server
Git clone boliquan/wp-code-highlight.git // will download to a folder named "wp-code-highlight" and source code c

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: 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.