Skip to content

Commit 9ec1629

Browse files
YasinDehfulidscho
authored andcommitted
feat(git-and-other-systems-migrating-to-git): translate file from en to fa language
1 parent 4d129ad commit 9ec1629

File tree

8 files changed

+330
-233
lines changed

8 files changed

+330
-233
lines changed

book/09-git-and-other-scms/sections/client-hg.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==== Git and Mercurial
1+
==== Git and مرکیوریال
22

33
(((Interoperation with other VCSs, Mercurial)))
44
(((Mercurial)))
Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
==== Bazaar
1+
==== بازار
22
(((Bazaar)))(((Importing, from Bazaar)))
33

4-
Bazaar is a DVCS tool much like Git, and as a result it's pretty straightforward to convert a Bazaar repository into a Git one.
5-
To accomplish this, you'll need to import the `bzr-fastimport` plugin.
4+
بازار یک ابزار DVCS است که بسیار شبیه به گیت است و به همین دلیل تبدیل یک مخزن بازار به گیت نسبتاً ساده استدانلود کنید.
5+
برای انجام این کار، شما به وارد کردن پلاگین `bzr-fastimport` نیاز دارید.
66

7-
===== Getting the bzr-fastimport plugin
7+
===== دریافت پلاگین bzr-fastimport
88

9-
The procedure for installing the fastimport plugin is different on UNIX-like operating systems and on Windows.
10-
In the first case, the simplest is to install the `bzr-fastimport` package that will install all the required dependencies.
9+
روش نصب پلاگین fastimport در سیستم‌عامل‌های شبیه UNIX و ویندوز متفاوت است.
10+
در حالت اول، ساده‌ترین راه نصب بسته `bzr-fastimport` است که تمام وابستگی‌های لازم را نصب می‌کند.
1111

12-
For example, with Debian and derived, you would do the following:
12+
برای مثال، با دبیان و مشتقات آن، شما باید به صورت زیر عمل کنید:
1313

1414
[source,console]
1515
----
1616
$ sudo apt-get install bzr-fastimport
1717
----
1818

19-
With RHEL, you would do the following:
19+
با RHEL، شما باید به صورت زیر عمل کنید:
2020

2121
[source,console]
2222
----
2323
$ sudo yum install bzr-fastimport
2424
----
2525

26-
With Fedora, since release 22, the new package manager is dnf:
26+
با فدورا، از آنجا که از نسخه 22 به بعد، مدیر بسته جدید dnf است:
2727

2828
[source,console]
2929
----
3030
$ sudo dnf install bzr-fastimport
3131
----
3232

33-
If the package is not available, you may install it as a plugin:
33+
اگر بسته در دسترس نیست، می‌توانید آن را به عنوان یک پلاگین نصب کنید:
3434

3535
[source,console]
3636
----
37-
$ mkdir --parents ~/.bazaar/plugins # creates the necessary folders for the plugins
37+
$ mkdir --parents ~/.bazaar/plugins # ایجاد پوشه‌های لازم برای پلاگین‌ها
3838
$ cd ~/.bazaar/plugins
39-
$ bzr branch lp:bzr-fastimport fastimport # imports the fastimport plugin
39+
$ bzr branch lp:bzr-fastimport fastimport # وارد کردن پلاگین fastimport
4040
$ cd fastimport
41-
$ sudo python setup.py install --record=files.txt # installs the plugin
41+
$ sudo python setup.py install --record=files.txt # نصب پلاگین
4242
----
4343

44-
For this plugin to work, you'll also need the `fastimport` Python module.
45-
You can check whether it is present or not and install it with the following commands:
44+
برای اینکه این پلاگین کار کند، شما همچنین به ماژول پایتون `fastimport` نیاز دارید.
45+
می‌توانید بررسی کنید که آیا موجود است یا نه و با دستورات زیر آن را نصب کنید:
4646

4747
[source,console]
4848
----
@@ -52,99 +52,109 @@ Traceback (most recent call last):
5252
ImportError: No module named fastimport
5353
$ pip install fastimport
5454
----
55-
If it is not available, you can download it at address https://pypi.python.org/pypi/fastimport/.
55+
اگر در دسترس نیست، می‌توانید آن را از آدرس https://pypi.python.org/pypi/fastimport/.
5656

57-
In the second case (on Windows), `bzr-fastimport` is automatically installed with the standalone version and the default installation (let all the checkboxes checked).
58-
So in this case you have nothing to do.
57+
در حالت دوم (در ویندوز)، `bzr-fastimport` به طور خودکار با نسخه مستقل و نصب پیش‌فرض (اجازه دهید
58+
تمام جعبه‌های انتخاب شده باقی بمانند) نصب می‌شود.
59+
بنابراین در این حالت شما هیچ کاری برای انجام ندارید.
5960

60-
At this point, the way to import a Bazaar repository differs according to that you have a single branch or you are working with a repository that has several branches.
61+
در این مرحله، روش وارد کردن یک مخزن بازار بسته به اینکه آیا شما یک شاخه واحد دارید یا با مخزنی کار می‌کنید که
62+
چندین شاخه دارد، متفاوت است.
6163

62-
===== Project with a single branch
64+
===== پروژه با یک شاخه واحد
6365

64-
Now `cd` in the directory that contains your Bazaar repository and initialize the Git repository:
66+
اکنون `cd` در دایرکتوری که مخزن بازار شما در آن قرار دارد و مخزن گیت را راه‌اندازی کنید:
6567

6668
[source,console]
6769
----
6870
$ cd /path/to/the/bzr/repository
6971
$ git init
7072
----
7173

72-
Now, you can simply export your Bazaar repository and convert it into a Git repository using the following command:
74+
اکنون، می‌توانید به سادگی مخزن بازار خود را صادر کرده و آن را به یک مخزن گیت تبدیل کنید با استفاده از دستور
75+
زیر:
7376

7477
[source,console]
7578
----
7679
$ bzr fast-export --plain . | git fast-import
7780
----
7881

79-
Depending on the size of the project, your Git repository is built in a lapse from a few seconds to a few minutes.
82+
بسته به اندازه پروژه، مخزن گیت شما در یک بازه زمانی از چند ثانیه تا چند دقیقه ساخته می‌شود.
8083

81-
===== Case of a project with a main branch and a working branch
84+
===== موردی از پروژه با یک شاخه اصلی و یک شاخه
85+
کاری
8286

83-
You can also import a Bazaar repository that contains branches.
84-
Let us suppose that you have two branches: one represents the main branch (myProject.trunk), the other one is the working branch (myProject.work).
87+
شما همچنین می‌توانید یک مخزن بازار که شامل شاخه‌ها است را وارد کنید.
88+
فرض کنید که شما دو شاخه دارید: یکی نمایانگر شاخه اصلی (myProject.trunk) و دیگری شاخه کاری (myProject.work)
89+
است.
8590

8691
[source,console]
8792
----
8893
$ ls
8994
myProject.trunk myProject.work
9095
----
9196

92-
Create the Git repository and `cd` into it:
97+
مخزن گیت را ایجاد کنید و `cd` به آن بروید:
9398

9499
[source,console]
95100
----
96101
$ git init git-repo
97102
$ cd git-repo
98103
----
99104

100-
Pull the `master` branch into git:
105+
شاخه `master` را به گیت بکشید:
101106

102107
[source,console]
103108
----
104109
$ bzr fast-export --export-marks=../marks.bzr ../myProject.trunk | \
105110
git fast-import --export-marks=../marks.git
106111
----
107112

108-
Pull the working branch into Git:
113+
شاخه کاری را به گیت بکشید:
109114

110115
[source,console]
111116
----
112117
$ bzr fast-export --marks=../marks.bzr --git-branch=work ../myProject.work | \
113118
git fast-import --import-marks=../marks.git --export-marks=../marks.git
114119
----
115120

116-
Now `git branch` shows you the `master` branch as well as the `work` branch.
117-
Check the logs to make sure they're complete and get rid of the `marks.bzr` and `marks.git` files.
121+
اکنون `git branch` به شما شاخه `master` و همچنین شاخه `work` را نشان می‌دهد.
122+
لاگ‌ها را بررسی کنید تا مطمئن شوید که کامل هستند و فایل‌های `marks.bzr` و `marks.git` را
123+
حذف کنید.
118124

119-
===== Synchronizing the staging area
125+
===== همگام‌سازی ناحیه موقت
120126

121-
Whatever the number of branches you had and the import method you used, your staging area is not synchronized with `HEAD`, and with the import of several branches, your working directory is not synchronized either.
122-
This situation is easily solved by the following command:
127+
هر تعداد شاخه‌ای که داشتید و روش وارداتی که استفاده کردید، ناحیه موقت شما با `HEAD` همگام نیست و
128+
با واردات چندین شاخه، دایرکتوری کاری شما نیز همگام نیست.
129+
این وضعیت به راحتی با دستور زیر حل می‌شود:
123130

124131
[source,console]
125132
----
126133
$ git reset --hard HEAD
127134
----
128135

129-
===== Ignoring the files that were ignored with .bzrignore
136+
===== نادیده گرفتن فایل‌هایی که با .bzrignore نادیده گرفته
137+
شده‌اند
130138

131-
Now let's have a look at the files to ignore.
132-
The first thing to do is to rename `.bzrignore` into `.gitignore`.
133-
If the `.bzrignore` file contains one or several lines starting with "!!" or "RE:", you'll have to modify it and perhaps create several `.gitignore` files in order to ignore exactly the same files that Bazaar was ignoring.
139+
اکنون بیایید نگاهی به فایل‌هایی که باید نادیده گرفته شوند بیندازیم.
140+
اولین کار این است که `.bzrignore` را به `.gitignore` تغییر نام دهید.
141+
اگر فایل `.bzrignore` شامل یک یا چند خط باشد که با "!!" یا "RE:" شروع می‌شود، باید آن را اصلاح کنید
142+
و شاید چندین `.gitignore` ایجاد کنید تا دقیقاً همان فایل‌هایی را که بازار نادیده می‌گرفت، نادیده
143+
بگیرید.
134144

135-
Finally, you will have to create a commit that contains this modification for the migration:
145+
در نهایت، شما باید یک کامیت ایجاد کنید که این اصلاح را برای مهاجرت شامل شود:
136146

137147
[source,console]
138148
----
139149
$ git mv .bzrignore .gitignore
140-
$ # modify .gitignore if needed
141-
$ git commit -am 'Migration from Bazaar to Git'
150+
$ # در صورت نیاز .gitignore را اصلاح کنید
151+
$ git commit -am 'مهاجرت از بازار به گیت'
142152
----
143153

144-
===== Sending your repository to the server
154+
===== ارسال مخزن شما به سرور
145155

146-
Here we are!
147-
Now you can push the repository onto its new home server:
156+
اینجا هستیم!
157+
اکنون می‌توانید مخزن را به سرور جدید خود فشار دهید:
148158

149159
[source,console]
150160
----
@@ -153,4 +163,4 @@ $ git push origin --all
153163
$ git push origin --tags
154164
----
155165

156-
Your Git repository is ready to use.
166+
مخزن گیت شما آماده استفاده است.

0 commit comments

Comments
 (0)