文章目录
一、创建并查询标签
二、推送单个标签到远程仓库
三、推送所有标签到远程仓库
四、删除远程仓库的标签
一、创建并查询标签
执行
git log --pretty=oneline --abbrev-commit
命令 , 查询当前的提交记录 ; 执行
git tag -a v0.9 -m "text" 2bd4156
命令 , 创建标签 , 并附加说明文字 ; 执行
git tag
命令 , 查询标签 ; 执行
git show v0.9
命令 , 查询标签的详细信息 ;
完整的执行过程 :
D:\Git\git-learning-course>git log --pretty=oneline --abbrev-commit 2bd4156 (HEAD -> master, origin/master, origin/HEAD) Merge branch 'feature1' into 'master' d2fde16 Merge branch 'master' into 'feature1' faafce2 master 3d9de4a feature1 e9d0ace master c9842ef master 26b1978 feature1 5220e76 update 8e848b1 Merge branch 'revert-c31c3379' into 'master' bea66a2 Revert "Merge branch 'feature1'" c31c337 Merge branch 'feature1' f5900c5 & simple 17d0c76 AND simple 4e31d93 modify dev file1 d74ada0 remove file3.txt 297422e modify file1 and 2 dd0db50 modify file2 63a9ef1 modify file1 72e82e0 modify file4 5bcec31 add 1 files f95c831 add 3 files f2f9a97 Update README.md 5d7e8d4 Initial commit D:\Git\git-learning-course>git tag -a v0.9 -m "text" 2bd4156 D:\Git\git-learning-course>git tag v0.9 D:\Git\git-learning-course>git show v0.9 tag v0.9 Tagger: hanshuliang <octopus_truth@163.com> Date: Fri Dec 10 09:18:18 2021 +0800 text commit 2bd415662b4f539fc2c320df8a22e495cf4743f1 (HEAD -> master, tag: v0.9, origin/master, origin/HEAD) Merge: faafce2 d2fde16 Author: 韩曙亮 <hanshuliang@aliyun.com> Date: Thu Dec 9 13:04:47 2021 +0800 Merge branch 'feature1' into 'master' 分支合并 ( 将 feature1 合并到 master 分支 ) See merge request han12020121/git-learning-course!5