|
1 |
| -## Git Tag ## |
| 1 | +## Tags no Git ## |
2 | 2 |
|
3 |
| -### Lightweight Tags ### |
| 3 | +### Tags "Peso-Leve" ### |
4 | 4 |
|
5 |
| -We can create a tag to refer to a particular commit by running linkgit:git-tag[1] |
6 |
| -with no arguments. |
| 5 | +Nós podemos criar uma tag para referenciar um commit particular executando |
| 6 | +linkgit:git-tag[1] sem nenhum argumento. |
7 | 7 |
|
8 | 8 | $ git tag stable-1 1b2e1d63ff
|
9 |
| - |
10 |
| -After that, we can use stable-1 to refer to the commit 1b2e1d63ff. |
11 | 9 |
|
12 |
| -This creates a "lightweight" tag, basically a branch that never moves. |
13 |
| -If you would also like to include a comment with the tag, |
14 |
| -and possibly sign it cryptographically, then we can create a *tag object* instead. |
| 10 | +Depois disso, nós podemos usar a tag 'stable-1' para referenciar o commit 1b2e1d63ff. |
| 11 | + |
| 12 | +Isso cria uma tag "peso-leve", basicamente um branch que nunca se altera. |
| 13 | +Se você também gostaria de incluir um comentário com a tag, e possivelmente |
| 14 | +assinar criptograficamente, então em vez disso nós podemos criar um *tag object* . |
15 | 15 |
|
16 | 16 | ### Tag Objects ###
|
17 | 17 |
|
18 |
| -If one of **-a**, **-s**, or **-u <key-id>** is passed, the command creates a tag object, |
19 |
| -and requires the tag message. Unless -m <msg> or -F <file> is given, an editor |
20 |
| -is started for the user to type in the tag message. |
| 18 | +Se um dos **-a**, **-s**, ou **-u <key-id>** é passado, o comando cria uma tag |
| 19 | +object, e solicita uma mensagem da tag. A não ser que -m <msg> ou -F <arquivo> |
| 20 | +seja dado, um editor é iniciado para o usuário digitar a mensagem da tag. |
21 | 21 |
|
22 |
| -When this happens, a new object is added to the Git object database and the |
23 |
| -tag ref points to that _tag object_, rather than the commit itself. The strength |
24 |
| -of this is that you can sign the tag, so you can verify that it is the correct |
25 |
| -commit later. You can create a tag object like this: |
| 22 | +Quando isso acontece, um objeto é adicionado para o banco de dados de objeto |
| 23 | +Git e a tag ref aponta para esse _tag object_, em vez realizar um commit dele. |
| 24 | +A força disso é que você pode assinar a tag, então você pode verificar que |
| 25 | +este é o último commit correto. |
26 | 26 |
|
27 | 27 | $ git tag -a stable-1 1b2e1d63ff
|
28 |
| - |
29 |
| -It is actually possible to tag any object, but tagging commit objects is the |
30 |
| -most common. (In the Linux kernel source, the first tag object |
31 |
| -references a tree, rather than a commit) |
32 | 28 |
|
33 |
| -### Signed Tags ### |
| 29 | +Na verdade é possível adicionar um tag em qualquer objeto, mas é mais comum |
| 30 | +colocar tags em objetos do tipo commit. (No código fonte do kernel do Linux, a |
| 31 | +primeira tag referencia uma árvore, em vez de um commit) |
34 | 32 |
|
35 |
| -If you have a GPG key setup, you can create signed tags fairly easily. First, |
36 |
| -you will probably want to setup your key id in your _.git/config_ or _~.gitconfig_ |
37 |
| -file. |
| 33 | +### Tags Assinadas ### |
| 34 | + |
| 35 | +Se você tem uma chave GPG configurada, você pode criar tags assinadas mais |
| 36 | +facilmente. Primeiro, provavelmente irá querer configurar o id de sua chave no |
| 37 | +seu arquivo _.git/condig_ ou _~.gitconfig_ |
38 | 38 |
|
39 | 39 | [user]
|
40 | 40 | signingkey = <gpg-key-id>
|
41 | 41 |
|
42 |
| -You can also set that with |
| 42 | +Você também pode configurá-lo com |
43 | 43 |
|
44 | 44 | $ git config (--global) user.signingkey <gpg-key-id>
|
45 | 45 |
|
46 |
| -Now you can create a signed tag simply by replacing the **-a** with a **-s**. |
| 46 | +Agora você pode criar uma tag assinada através da substituição do **-a** |
| 47 | +pelo **-s**. |
47 | 48 |
|
48 | 49 | $ git tag -s stable-1 1b2e1d63ff
|
49 |
| - |
50 |
| -If you don't have your GPG key in your config file, you can accomplish the same |
51 |
| -thing this way: |
| 50 | + |
| 51 | +Se você não tem sua chave GPG no seu arquivo de configuração, você pode |
| 52 | +realizar a mesmo coisa dessa forma: |
52 | 53 |
|
53 | 54 | $ git tag -u <gpg-key-id> stable-1 1b2e1d63ff
|
0 commit comments