您的位置:首页 > 编程语言

Git---Git及GitHub使用笔记

2016-08-20 12:51 211 查看
一、远程项目获取(克隆)


syntax:


$ git clone <版本库的网址>


$ git clone <版本库的网址> <本地目录名>


example:

$ git clone https://github.com/jquery/jquery.git[/code] 
$ 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: