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/sections/tagging.asc
+49-46Lines changed: 49 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,14 @@
1
1
[[_git_tagging]]
2
-
=== Tagging
2
+
=== برجسب گذاری
3
3
4
4
(((tags)))
5
-
Like most VCSs, Git has the ability to tag specific points in history as being important.
6
-
Typically people use this functionality to mark release points (v1.0, and so on).
7
-
In this section, you'll learn how to list the available tags, how to create new tags, and what the different types of tags are.
5
+
همچون دیگر سامانه های کنترل نسخه، گیت هم می تواند یک نقطه ی خاص از تاریخچه ی پروژه را به عنواه نقطه ی مهم و با اهمیت برچسب گذاری کند.
6
+
معمولا افراد از این قابلیت برای نشانه گذاری نسخه های قابل ارائه یا همان release کردن پروژه بهره می برند.( نسخه v1.0، و به همین ترتیب).
7
+
در این بخش یاد فهرست گرفتن از برچسب های موجود، شیوه ساخت برچسب جدید و این که گونه های متفاوت برچسب ها هر کدام چه هستند را یاد خواهید گرفت.
8
8
9
-
==== Listing Your Tags
9
+
==== فهرست برچسب های موجود
10
10
11
-
Listing the available tags in Git is straightforward.
12
-
Just type `git tag` (with optional `-l` or `--list`):(((git commands, tag)))
11
+
فهرست گیری از برچسب هیا موجود در گیت بسیار ساده است. تنها نیاز است که دستور `git tag` (با پارامتر دلخواه `-l` و یا `--list`) را وارد نمایید:(((git commands, tag)))
13
12
14
13
[source,console]
15
14
----
@@ -18,11 +17,11 @@ v0.1
18
17
v1.3
19
18
----
20
19
21
-
This command lists the tags in alphabetical order; the order in which they appear has no real importance.
20
+
این دستور، برچسب های موجود را به ترتیب حرف الفبا نشان می دهد; درواقع ترتیب نمایش آنها هیچ اهمیت ندارد.
22
21
23
-
You can also search for tags that match a particular pattern.
24
-
The Git source repo, for instance, contains more than 500 tags.
25
-
If you're only interested in looking at the 1.8.5 series, you can run this:
22
+
همچنین می توان برچسب ها را جست و جو کنید و از قواعد الگوها نیز بهره مند شود.
23
+
برای نمونه مخزن اصلی گیت، بیش از 500 برچسب دارد.
24
+
مثلا اگر میخواید تنها به دنبال برجسب های سری 1.8.5 بگردید، می توانید دستور زیر را اجرا نمایید.
26
25
27
26
[source,console]
28
27
----
@@ -47,22 +46,23 @@ If you want just the entire list of tags, running the command `git tag` implicit
47
46
If, however, you're supplying a wildcard pattern to match tag names, the use of `-l` or `--list` is mandatory.
48
47
====
49
48
50
-
==== Creating Tags
49
+
==== ساخت برچسب ها
51
50
52
-
Git supports two types of tags: _lightweight_ and _annotated_.
51
+
گیت دو گونه برچسب دارد: _lightweight_ یا __سبک__ و _annotated_ یا __مفصل__.
53
52
54
-
A lightweight tag is very much like a branch that doesn't change -- it's just a pointer to a specific commit.
53
+
یگ برچسب lightweight بسیار شبیه یک شاخه ی بدون تغییر است. -- فقط اشاره گری به یک ثبت ویژ] و مشخص است.
55
54
56
-
Annotated tags, however, are stored as full objects in the Git database.
57
-
They're checksummed; contain the tagger name, email, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
58
-
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.
55
+
برچسب های Annotated , however, به عنوان مجموعه ای از اشیاء کامل در پایگاه داده گیت ذخیره می شوند.
56
+
این برچسب ها کنترل checksum می شوند; شامل نام کاربر، ایمیل و تاریخ برجسب گذاری هستند; پیام مربوط به برچسب را دارند; و می توان آنها را با GPG (GNU Privacy Guard) علامت گذاری و تایید نمود.
57
+
58
+
بیشتر پیشنهاد می شود که برچسب های annotated ایجاد کنید تا به همه این داده ها دسترسی داشته باشد; اما اگر تنها یک برچسب موفت و گذرا نیاز دارید و یا به هر روی نباید داده ها ذخیره شوند می توانید از برچسب های lightweight بهره بگیرید.
59
59
60
60
[[_annotated_tags]]
61
-
==== Annotated Tags
61
+
==== برچسبهای Annotated
62
62
63
63
(((tags, annotated)))
64
-
Creating an annotated tag in Git is simple.
65
-
The easiest way is to specify `-a` when you run the `tag` command:(((git commands, tag)))
64
+
ساخت یک برچسب Annotated در گیت بسیار ساده است.
65
+
ساده ترین راه افزدون `-a` هنگام اجرای دستور `tag` می باشد:(((git commands, tag)))
66
66
67
67
[source,console]
68
68
----
@@ -73,10 +73,10 @@ v1.3
73
73
v1.4
74
74
----
75
75
76
-
The `-m` specifies a tagging message, which is stored with the tag.
77
-
If you don't specify a message for an annotated tag, Git launches your editor so you can type it in.
76
+
`-m` مشخص گننده پیام برچسب است، که با برچسب ذخیره خواهد شد.
77
+
اگر پیامی برای یک برچسب annotated مشخص نکنید گیت ویرایش پیش فرض را اجرا کرده و شما می توانید آنجا نوشتن را بیاغازید.
78
78
79
-
You can see the tag data along with the commit that was tagged by using the `git show` command:
79
+
داده های برچسب را میتوانید در همان ثبت برچسب گذاری شده با دستور `git show` ببینید.
Now, when someone else clones or pulls from your repository, they will get all your tags as well.
221
+
اینک اگر کسی دیگر از مخزن ما نمونه برداری کرد یا تنها ثبت ها را فراخوانی و بارگزاری کرد، تمام برجسب ها را نیز دریافت خواهد نمود.
219
222
220
223
==== Checking out Tags
221
224
222
-
If you want to view the versions of files a tag is pointing to, you can do a git checkout, though this puts your repository in ``detached HEAD'' state, which has some ill side effects:
225
+
اگر نسخه های فایلهایی که برچسب به آنها اشاره می کند را می خواهید ببینید، می توانید یک git checkout اجرا کنید، آگاه باشید که این کار مخزن شما را در وضعیت **detached HEAD** قرار میدهد, که امکان تاثیر جانبی ناپسندی دارد.:
223
226
224
227
[source,console]
225
228
----
@@ -242,12 +245,12 @@ Previous HEAD position was 99ada87... Merge pull request #89 from schacon/append
242
245
HEAD is now at df3f601... add atlas.json and cover image
243
246
----
244
247
245
-
In ``detached HEAD'' state, if you make changes and then create a commit, the tag will stay the same, but your new commit won't belong to any branch and will be unreachable, except for by the exact commit hash. Thus, if you need to make changes -- say you're fixing a bug on an older version, for instance -- you will generally want to create a branch:
248
+
در وضعیت **detached HEAD** اگر تغییراتی ایجاد کنید و آنها را ثبت کنید، برچسب تغییر نخواهد کرد، ولی ثبت جدید در هیچ شاخه ای جای نمیگیرد و از دسترس خارج میشود، مگر با کد کامل hash مربوط به آن ثبت. بنابراین اگر نیاز به ایجاد تغییرات دارید -- مثلا میخواهید یک باگ را در نسخه های پیشین برطرف نمایید -- شماه باید یک شاخه ی جدید بسازید.
246
249
247
250
[source,console]
248
251
----
249
252
$ git checkout -b version2 v2.0.0
250
253
Switched to a new branch 'version2'
251
254
----
252
255
253
-
If you do this and make a commit, your `version2` branch will be slightly different than your `v2.0.0` tag since it will move forward with your new changes, so do be careful.
256
+
با اجرای دستور بالا، اگر یک ثبت تازه ایجاد نمودید، شاخه ی `version2` اندکی متفاوت از برچسب `v2.0.0` خواهد بود. تا زمانی که با تغییرات جدید در این شاخه به پیش می رود. پس مرافب باشید.
0 commit comments