Synchronize the local code library with Github, and the code library Github
Installation and initialization
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, you must firstgit add .
'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