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 "your_email@youremail.com" 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 id_rsa.pub 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 id_rsa.pub file; next, enter the ssh-T git@github.com 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 user.name "username"git config --global user.email "your_email@youremail.com"
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 git@github.com: 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 git@github.com: boliquan/wp-code-highlight.git // will download to a folder named "wp-code-highlight" and source code c