forked from iicd/git-learner
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 11f7e06250 | |||
| fb0dd4d613 | |||
| 47fd86d4fa | |||
| 8c6aed4ca1 | 
							
								
								
									
										59
									
								
								notes/3.3-git_touch.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								notes/3.3-git_touch.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| ## 3.3 git 里程碑 | ||||
|  | ||||
| ### 3.3.1 显示里程碑 | ||||
|  | ||||
| ```bash | ||||
| git tag # 显示里程碑 | ||||
| git tag -n1 # 显示1行里程碑的说明 | ||||
| git tag -l jx/v2* # 使用过滤器 | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| git log --oneline --decorate # 查看提交对应的里程碑以及其他引用 | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| git describe # 显示<tag>-<num-g<commit> <tag> name <num> commit num <commit> commit | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| git name-rev HEAD # 显示提交ID和其对应的一个引用 这里是HEAD和master | ||||
| ``` | ||||
|  | ||||
| ### 3.3.2 创建里程碑 | ||||
|  | ||||
| ```bash | ||||
| git tag 		<tagname> [<commit>] # 轻量级里程碑 | ||||
| git tag -a		<tagname> [<commit>]  | ||||
| git tag -m <msg>	<tagname> [<commit>] # 带说明的里程碑 | ||||
| git tag -s		<tagname> [<commit>] | ||||
| git tag -u <key-id> 	<tagname> [<commit>] # 带GPG签名的里程碑 | ||||
| ``` | ||||
|  | ||||
| ### 3.3.3 删除里程碑 | ||||
|  | ||||
| ```bash | ||||
| git tag -d | ||||
| ``` | ||||
|  | ||||
| ### 3.3.4 不要更改里程 | ||||
|  | ||||
| ### 3.3.5 共享里程碑 | ||||
|  | ||||
| ```bash | ||||
| git ls-remote origin my* # 查看以my开头的里程碑 | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| git push origin mytag # 推送mytag到远端 | ||||
| git push origin refs/tags/* # 推送本地建立的所有里程碑 | ||||
| ``` | ||||
|  | ||||
| ### 3.3.6 删除远端里程碑 | ||||
|  | ||||
| ```bash | ||||
| git tag -d <tagname> | ||||
| git push origin :<tagname> | ||||
| ``` | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user