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

github项目TAG

2015-11-16 20:40 197 查看

前言

经常在github上看到老外的教学项目,做的很有特点,他们的教学项目git代码仓库使用TAG。

使学习者对照教学wiki和github, 经过体验确实学习效率有所提高。

目标

本作也来实现这样的效果, 以上文提到的Ionic todo guide入手来做简单的TAG, 方便追踪todo项目的演化过程。

todo github 是我按照官网的guide步骤来制作的github仓库, 其中加入了TAG, 这样方便读者查看某个ChapterX的时候对照着查看修改的内容。

官方guide地址: 点我

TAG制作

进入本地目录, 再添加完Chapter3代码后 执行如下命令:

git tag Chapter3
git push origin Chapter3


结果如下:

Administrator@JOHN /e/Web-DEV/Ionic/todo (master)
$ git push origin Chapter3
Username for 'https://github.com': tancolo
Password for 'https://tancolo@github.com':
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/tancolo/IonicDemo.git * [new tag]         Chapter3 -> Chapter3




通用格式

git tag <tagname>
git push origin <tagname>


其中
git push origin <tagname>
是push单个的TAG, 还可以一次性push项目所有的TAG。

关于push所有TAG的,详见 参考 内容。

参考

Create a tag in GitHub repository

Push a tag to a remote repository using Git?

Ionic demo
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  github git-TAG ionic-demo