Git---Git及GitHub使用笔记

一、远程项目获取(克隆)
syntax:
$ git clone <版本库的网址>
$ git clone <版本库的网址> <本地目录名>
example:
$ git clone https://github.com/jquery/jquery.git
$ git clone http[s]://example.com/path/to/repo.git/
$ git clone ssh://example.com/path/to/repo.git/
$ git clone git://example.com/path/to/repo.git/
$ git clone /opt/git/project.git 
$ git clone file:///opt/git/project.git
$ git clone ftp[s]://example.com/path/to/repo.git/
$ git clone rsync://example.com/path/to/repo.git/
二、代码提交
$ git pull
$ git add .
$ git commit -m "update project"
$ git push origin master
三、打标签
$ git tag
$ git tag -d 1.0
$ git push origin --delete tag 1.0
$ git tag 1.0
$ git push --tags
原文地址:https://www.cnblogs.com/ysjshrine/p/5790219.html