git tags 使用 远程创建git tags 删除(小抄版)
by
at 2012-08-01 21:13:10
original http://hlee.iteye.com/blog/1616461
update
0.5 获取远程tag
my_abc是tag号
git clone http://git.abc.net/git/abc.git git checkout my_abc OR git checkout -b new_branch my_abc
创建
1. 本地创建tags
git tag -a v1.1 -m "new release"
1.5 查看本地tags
git tag -l
2. push到服务器端
git push --tags
2.2.1 创建和删除远程branch
git push origin head:newbranch_name删除远程分支,其它开发者要git branch -d -r 分支
git push origin :newbranch_name
2.3 删除本地tag
git tag -d v1.1
3. 删除服务器端远程tag
git push origin :refs/tags/v1.1
4. 查看远程服务器端
$ git remote show origin
引用
* remote origin
URL: git://github.com/rails/rails.git
Remote branch merged with 'git pull' while on branch master
master
Tracked remote branches
1-2-stable 2-0-stable 2-1-stable 2-2-stable 3-0-unstable master
URL: git://github.com/rails/rails.git
Remote branch merged with 'git pull' while on branch master
master
Tracked remote branches
1-2-stable 2-0-stable 2-1-stable 2-2-stable 3-0-unstable master
$ git ls-remote --heads origin
引用
5b3f7563ae1b4a7160fda7fe34240d40c5777dcd refs/heads/1-2-stable
71926912a127da29530520d435c83c48778ac2b2 refs/heads/2-0-stable
2b158543247a150e8ec568becf360e7376f8ab84 refs/heads/2-1-stable
b0792a3e7be88e3060af19bab01cd3d26d347e4c refs/heads/2-2-stable
d6b9f8410c990b3d68d1970f1461a1d385d098d7 refs/heads/3-0-unstable
f04346d8b999476113d5e5a30661e07899e3ff80 refs/heads/master
71926912a127da29530520d435c83c48778ac2b2 refs/heads/2-0-stable
2b158543247a150e8ec568becf360e7376f8ab84 refs/heads/2-1-stable
b0792a3e7be88e3060af19bab01cd3d26d347e4c refs/heads/2-2-stable
d6b9f8410c990b3d68d1970f1461a1d385d098d7 refs/heads/3-0-unstable
f04346d8b999476113d5e5a30661e07899e3ff80 refs/heads/master
给同行个链接
<br><br>
<span style="color:red">
<a href="http://hlee.iteye.com/blog/1616461#comments" style="color:red">已有 <strong>0</strong> 人发表留言,猛击->><strong>这里</strong><<-参与讨论</a>
</span>
<br><br><br>
ITeye推荐