一、远程项目获取(克隆)
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
时间: 2024-11-06 07:13:26