命令行:

git tag -a v3. -m "这是4.0版本"
git push origin v3.
//git tag -a 标签名称 -m "说明"
//git push origin 标签名称

删除tag

git tag -d v1.  //删除本地tag

git push origin :v1.//删除远程tag
//也可以这样
git push origin --delete tag V1.

以上命令在项目仓库创建了一个v3.0的release,如下图:


1.进入到项目仓库,选择release选项卡,可以点击create a new release/Draft a new release创建一个新的release.

2.未勾选This is a pre-release通过github官方提供的api可访问我们的release信息,格式如下:

/repos/:owner/:repo/releases/:id

更多API说明访问:https://developer.github.com/v3/repos/releases/

例:访问https://api.github.com/repos/kingBook/testGit/releases/latest可以获取如下信息

{
"url": "https://api.github.com/repos/kingBook/testGit/releases/9028810",
"assets_url": "https://api.github.com/repos/kingBook/testGit/releases/9028810/assets",
"upload_url": "https://uploads.github.com/repos/kingBook/testGit/releases/9028810/assets{?name,label}",
"html_url": "https://github.com/kingBook/testGit/releases/tag/2.0",
"id": 9028810,
"tag_name": "2.0",
"target_commitish": "master",
"name": "testGit v2.0",
"draft": false,
"author": {
"login": "kingBook",
"id": 4969180,
"avatar_url": "https://avatars3.githubusercontent.com/u/4969180?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kingBook",
"html_url": "https://github.com/kingBook",
"followers_url": "https://api.github.com/users/kingBook/followers",
"following_url": "https://api.github.com/users/kingBook/following{/other_user}",
"gists_url": "https://api.github.com/users/kingBook/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kingBook/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kingBook/subscriptions",
"organizations_url": "https://api.github.com/users/kingBook/orgs",
"repos_url": "https://api.github.com/users/kingBook/repos",
"events_url": "https://api.github.com/users/kingBook/events{/privacy}",
"received_events_url": "https://api.github.com/users/kingBook/received_events",
"type": "User",
"site_admin": false
},
"prerelease": false,
"created_at": "2017-05-03T08:34:10Z",
"published_at": "2017-12-26T06:01:54Z",
"assets": [ ],
"tarball_url": "https://api.github.com/repos/kingBook/testGit/tarball/2.0",
"zipball_url": "https://api.github.com/repos/kingBook/testGit/zipball/2.0",
"body": "这是第二个版本"
}

git release功能的更多相关文章

  1. Git是什么、Git的功能、为什么versioncontrol用Git、Git的常用命令、Git的优缺点

    Git是什么 git是目前世界上最先进的分布式版本控制系统(没有之一). Git是用于 Linux内核开发的版本控制工具.与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版 ...

  2. SVN和Git的功能和区别,尚学堂SVN和Git学习视频资料免费下载

    对于软件开发人员来说,版本控制系统再熟悉不过了,所谓版本控制系统就是软件项目开发过程中用于储存开发人员所写代码所有修订版本的软件.目前常见的版本控制系统分为集中式版本控制系统(SVN)和分布式版本控制 ...

  3. git stash功能的使用

    一,git stash的作用: 能够将所有未提交的修改(工作区和暂存区)保存至堆栈中,用于后续恢复当前工作目录 说明:架构森林是一个专注架构的博客,地址:https://www.cnblogs.com ...

  4. 有了Git这个功能,再也不需要依赖IDE了!

    大家好,今天给大家介绍一个隐藏的功能--搜索. 我们在写代码的时候经常遇到的一种情况就是,我们想要知道某一个函数是怎么定义的,这样我们才能知道该如何调用它.如果代码少的话我们当然可以自己人肉查找,但是 ...

  5. git: 常用功能等

    1. an very useful simple git guide link: http://rogerdudler.github.io/git-guide/index.zh.html

  6. 如何使用 Android Studio 的 git hub 功能

    How to use GitHub with Android Studio This article will explain how to use GitHub with Android Studi ...

  7. Git:常用功能 - 命令行

    1. 正在某个分支进行开发,突然有个紧急BUG需要切换到其他分支进行修复? git add README.md # 将文件添加到暂存区 git stash save "v1.0.0 in d ...

  8. Git常用功能记录

    1. git查看某个文件的修改历史 git log --pretty 然后使用下面的命令可列出文件的所有改动历史,注意,这里着眼于具体的一个文件,而不是git库,如果是库,那改动可多了去了- git ...

  9. tortoise git常用功能

    1.打tag TortoiseGit -> show log -> 选中版本 -> create tag at this version... TortoiseGit -> p ...

随机推荐

  1. [UE4]显示队友

  2. 【Laravel】 常用的artisan命令【原创】

    全局篇   查看artisan命令 php artisan php artisan list   查看某个帮助命令 php artisan help make:model   查看laravel版本 ...

  3. centos 7 安装sqoop 1.4.7

    1. 下载sqoop1.4.7 cd /home/workspace wget https://mirrors.tuna.tsinghua.edu.cn/apache/sqoop/1.4.7/sqoo ...

  4. 解决IIS7下主机名灰色无法修改问题

    打开IIS ,找到网站,右击编辑绑定时: 关于导入iis   .pfx格式的证书后,编辑绑定时,主机名为灰色的问题 解决方法 : (1)打开C:\Windows\system32\inetsrv\co ...

  5. CentOS、Ubuntu、Debian简析

    Centos .Ubuntu.Debian 三个Linux都是非常优秀的系统,开源的系统,也分付费的商业版和免费版,下面简单比较这三种系统. Centos系统 非常多的商业公司部署在生产环境上的服务器 ...

  6. python学习之----收集整个网站

    如果只是从一个页面跳到另一个页面,那么网络爬虫是非常无聊的.为了有效地使 用它们,在用爬虫的时候我们需要在页面上做些事情.让我们看看如何创建一个爬虫来收 集页面标题.正文的第一个段落,以及编辑页面的链 ...

  7. TCP/IP_网络基础知识

    今天看到k8s的网络,顿感网络知识不是特别扎实,立马回头补一下Tcp-ip知识,顺便记录下学习的过程: 计算机与网络发展的7个阶段: 批处理时代(计算机按照顺序处理,50年代)->分时系统时代( ...

  8. Call requires permission which may be rejected by user: code should explicitly check to see if permi

    Call requires permission which may be rejected by user: code should explicitly check to see if permi ...

  9. 20165205 2017-2018-2《Java程序设计》结对编程一 第一周总结

    20165205 2017-2018-2<Java程序设计>结对编程一 第一周总结 需求分析 对输入的算式进行计算,要求满足一下条件: 支持整数运算,如2+5,47+7865. 支持多运算 ...

  10. asp 月末 月初

    上个月第一天:<%=dateadd("m",-1,year(date)&"-"&month(date)&"-1" ...