티스토리 뷰

Version Control

git. Tag추가, 변경, 삭제

out of coding 2018. 6. 25. 15:52

tag를 간간히 소스에 마킹용으로 사용은 하고 있었지만

cocoapods를 업데이트를 하면서 tag를 이용한 version을 하는것을 알게 되고 한번 정리하는 시간을 가져보려 합니다.


뭐... 태그를 기본적으로 잘 사용한다면 깔끔한 정리가 될수 있습니다.

나도 모르는 시점등등...


1. 등록된 Tag 조회


1
2
3
4
5
$ git tag
 
0.0.1
0.0.2
0.0.3_Test
cs


조건으로 검색하고 싶다면?


1
2
3
$ git tag -l v0.1.*
 
...
cs


2. Tag 생성하기


태그의 종류에는 Lightweight, Annotated 두가지 종류가 존재합니다.

일단 Lightweight는 그냥 기본적인 정보들을 넣을수 있고, Annotated는 만든 사람, 이메일, 날짜, GPG(GNU Privacy Guard)로 서명도 가능하다고 합니다.


1) Lightweight 기본 Tag


1
2
3
4
$ git tag 0.1.0
$ git tag
 
0.1.0
cs


2) Anotated 복잡한 Tag


1
git tag -a v0.2.0 -m "Message is Haha"
cs


조회하면 다음과 같습니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$ git show 0.2.0
tag 0.2.0
Tagger: OutOfCode <outofcoding@gmail.com>
Date:   Mon Jun 25 15:48:24 2018 +0900
 
haha
 
commit a562a1e61d719278477d1979136efde107ddaf66 (HEAD -> master, tag: 0.2.0, origin/master, origin/HEAD)
Author: OutOfCode <outofcoding@gmail.com>
Date:   Mon Jun 25 15:27:40 2018 +0900
 
    first commit
 
diff --git a/HintTextView.podspec b/HintTextView.podspec
new file mode 100644
index 0000000..2c229b7
--- /dev/null
+++ b/HintTextView.podspec
@@ -0,0 +1,16 @@
+Pod::Spec.new do |s|
+
+  s.name = "HintTextView"
+  s.version = "0.0.1"
+  s.summary = "UITextView support PlaceHolder."
+  s.homepage = "https://github.com/outofcoding/HintTextView"
+  s.license = { :type => "MIT", :file => "LICENSE" }
+  s.author = { "OutOfCode" => "outofcoding@gmail.com" }
+  s.source = { :git => "https://github.com/outofcoding/HintTextView.git", :tag => "#{s.version}" }
+  s.source_files = 'Sources/**/*'
+  s.requires_arc = true
+  s.ios.deployment_target = '8.0'
+  s.ios.framework = 'UIKit'
+  s.swift_version = '4.0'
+
+end
diff --git a/HintTextView.xcodeproj/project.pbxproj b/HintTextView.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..b32d38f
--- /dev/null
+++ b/HintTextView.xcodeproj/project.pbxproj
:
 
cs


저는 없지만 GPG 서명이 있을 경우에는 -s 옵션을 이용하여 서명을 할 수 있습니다.


3. 원격지에 올리기... Push하기


1
git push origin 0.1.0
cs


4. 모든 태그 올리기


1
git push origin --tags
cs


5. 작업지의 태그 삭제


1
git tag -d 0.1.0
cs


6. 원격지의 태그 삭제


1
git push origin :0.1.0
cs




댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함