You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/02-git-basics/1-git-basics.asc
+4-79Lines changed: 4 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1295,7 +1295,9 @@ v1.8.5.5
1295
1295
==== Creating Tags
1296
1296
1297
1297
Git uses two main types of tags: lightweight and annotated.
1298
+
1298
1299
A lightweight tag is very much like a branch that doesn’t change – it’s just a pointer to a specific commit.
1300
+
1299
1301
Annotated tags, however, are stored as full objects in the Git database.
1300
1302
They’re checksummed; contain the tagger name, e-mail, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
1301
1303
It’s generally recommended that you create annotated tags so you can have all this information; but if you want a temporary tag or for some reason don’t want to keep the other information, lightweight tags are available too.
Copy file name to clipboardExpand all lines: book/07-git-tools/1-git-tools.asc
+81Lines changed: 81 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -603,6 +603,87 @@ If you want an easier way to test the stashed changes again, you can run `git st
603
603
604
604
This is a nice shortcut to recover stashed work easily and work on it in a new branch.
605
605
606
+
607
+
=== Signing Your Work
608
+
609
+
Git is cryptographically secure, but it's not foolproof. If you're taking work from others on the internet and want to verify that commits are actually from a trusted source, Git has a few ways to sign and verify work using GPG.
610
+
611
+
==== Signed Tags
612
+
613
+
You can also sign your tags with GPG, assuming you have a private key.
614
+
All you have to do is use `-s` instead of `-a`:
615
+
616
+
[source,shell]
617
+
----
618
+
$ git tag -s v1.5 -m 'my signed 1.5 tag'
619
+
620
+
You need a passphrase to unlock the secret key for
0 commit comments