Skip to content

Commit 4ff3d69

Browse files
committed
Added draft translations for Ch.7.
1 parent 0e1c9c9 commit 4ff3d69

File tree

8 files changed

+1041
-69
lines changed

8 files changed

+1041
-69
lines changed

book/07-git-tools/1-git-tools.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include::sections/credentials.asc[]
3636

3737
=== Ανακεφαλαίωση
3838

39-
You’ve seen a number of advanced tools that allow you to manipulate your commits and staging area more precisely.
40-
When you notice issues, you should be able to easily figure out what commit introduced them, when, and by whom.
41-
If you want to use subprojects in your project, you’ve learned how to accommodate those needs.
42-
At this point, you should be able to do most of the things in Git that you’ll need on the command line day to day and feel comfortable doing so.
39+
Έχουμε δει αρκετά προχωρημένα εργαλεία που μας επιτρέπουν να χειριζόμαστε με μεγαλύτερη ακρίβεια τις υποβολές μας και το ενδιάμεσο στάδιο.
40+
Πλέον όταν παρατηρούμε προβλήματα, είμαστε σε θέση να καταλαβαίνουμε εύκολα ποια υποβολή τα εισήγαγε, πότε και από ποιον.
41+
Αν θέλουμε να χρησιμοποιήσουμε υποέργα στο έργο μας, έχουμε μάθει πώς να ικανοποιήσουμε αυτήν την ανάγκη.
42+
Σε αυτό το σημείο, είμαστε σε θέση να κάνουμε τα περισσότερα από τα πράγματα στο Git που θα χρειαστούμε στην γραμμή εντολών καθημερινά και αισθανόμαστε αυτοπεποίθηση να τα κάνουμε.

book/07-git-tools/sections/advanced-merging.asc

Lines changed: 231 additions & 18 deletions
Large diffs are not rendered by default.

book/07-git-tools/sections/bundling.asc

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33

44
Though we've covered the common ways to transfer Git data over a network (HTTP, SSH, etc), there is actually one more way to do so that is not commonly used but can actually be quite useful.
55

6+
Αν και καλύψαμε τους συνήθεις τρόπους μεταφοράς των δεδομένων Git μέσω δικτύου (HTTP, SSH κ.λπ.), υπάρχει πράγματι ένας ακόμη τρόπος να το κάνουμε αυτό που δεν χρησιμοποιείται συνήθως, αλλά μπορεί πραγματικά να είναι πολύ χρήσιμος.
7+
8+
Το Git είναι ικανό να «συνδέει» τα δεδομένα του σε ένα μόνο αρχείο.
9+
Αυτό μπορεί να είναι χρήσιμο σε διάφορα σενάρια.
10+
Ίσως το δίκτυό μας να είναι κάτω και θέλουμε να στείλουμε αλλαγές στους συναδέλφους μας.
11+
Ίσως εργαζόμαστε κάπου εκτός τόπου και δεν έχουμε πρόσβαση στο τοπικό δίκτυο για λόγους ασφαλείας.
12+
Ίσως η κάρτα μας ασύρματου / ethernet μόλις έσπασε.
13+
Ίσως να μην έχουμε επί του παρόντος πρόσβαση σε έναν κοινόχρηστο διακομιστή, θέλουμε να στείλουμε μηνύματα ηλεκτρονικού ταχυδρομείου σε κάποιον χρήστη και δεν θέλουμε να μεταφέρουμε 40 υποβολές μέσω του `format-patch`.
14+
615
Git is capable of ``bundling'' its data into a single file.
716
This can be useful in various scenarios.
817
Maybe your network is down and you want to send changes to your co-workers.
@@ -13,8 +22,11 @@ Maybe you don't have access to a shared server for the moment, you want to email
1322
This is where the `git bundle` command can be helpful.
1423
The `bundle` command will package up everything that would normally be pushed over the wire with a `git push` command into a binary file that you can email to someone or put on a flash drive, then unbundle into another repository.
1524

16-
Let's see a simple example.
17-
Let's say you have a repository with two commits:
25+
Αυτό είναι όπου η εντολή `git bundle` μπορεί να είναι χρήσιμη.
26+
Η εντολή `bundle` θα συσκευάσει όλα όσα θα έπρεπε κανονικά να ωθηθούν πάνω στο καλώδιο με μια εντολή` git push 'σε ένα δυαδικό αρχείο το οποίο μπορούμε να στείλουμε email σε κάποιον ή να τοποθετήσουμε μια μονάδα flash και στη συνέχεια να ξεδιπλώσουμε σε άλλο αποθετήριο.
27+
28+
Ας δούμε ένα απλό παράδειγμα.
29+
Ας υποθέσουμε ότι έχουμε ένα αποθετήριο με δύο υποβολές:
1830

1931
[source,console]
2032
----
@@ -32,6 +44,8 @@ Date: Wed Mar 10 07:34:01 2010 -0800
3244
first commit
3345
----
3446

47+
Εάν θέλουμε να στείλουμε αυτόν τον αποθετήριο σε κάποιον και δεν έχουμε πρόσβαση σε αποθετήριο για να πιέσουμε ή απλά δεν θέλουμε να το ορίσουμε, μπορούμε να τον συνδέσουμε με το `git bundle create`.
48+
3549
If you want to send that repository to someone and you don't have access to a repository to push to, or simply don't want to set one up, you can bundle it with `git bundle create`.
3650

3751
[source,console]
@@ -48,8 +62,17 @@ Now you have a file named `repo.bundle` that has all the data needed to re-creat
4862
With the `bundle` command you need to list out every reference or specific range of commits that you want to be included.
4963
If you intend for this to be cloned somewhere else, you should add HEAD as a reference as well as we've done here.
5064

65+
Τώρα έχουμε ένα αρχείο με το όνομα `repo.bundle` που έχει όλα τα δεδομένα που απαιτούνται για να δημιουργηθεί εκ νέου ο κλάδος` master` του αποθετηρίου.
66+
Με την εντολή `δέσμη 'πρέπει να παραθέσουμε κάθε αναφορά ή συγκεκριμένο εύρος υποβολών που θέλουμε να συμπεριλάβουμε.
67+
Αν σκοπεύουμε να κλωνοποιηθεί αυτό κάπου αλλού, θα πρέπει να προσθέσουμε HEAD ως αναφορά, όπως επίσης και εδώ.
68+
69+
Μπορούμε να στείλουμε μήνυμα ηλεκτρονικού ταχυδρομείου σε αυτό το αρχείο `repo.bundle` σε κάποιον άλλο, ή να το τοποθετήσουμε σε μια μονάδα USB και να το περπατήσουμε.
70+
5171
You can email this `repo.bundle` file to someone else, or put it on a USB drive and walk it over.
5272

73+
Από την άλλη πλευρά, πούμε ότι έχουμε στείλει αυτό το αρχείο `repo.bundle` και θέλουμε να εργαστούμε στο έργο.
74+
Μπορούμε να κλωνοποιήσουμε από το δυαδικό αρχείο σε έναν κατάλογο, όπως θα κάναμε από μια διεύθυνση URL.
75+
5376
On the other side, say you are sent this `repo.bundle` file and want to work on the project.
5477
You can clone from the binary file into a directory, much like you would from a URL.
5578

@@ -65,6 +88,10 @@ b1ec324 first commit
6588

6689
If you don't include HEAD in the references, you have to also specify `-b master` or whatever branch is included because otherwise it won't know what branch to check out.
6790

91+
Εάν δεν συμπεριλαμβάνουμε HEAD στις αναφορές, πρέπει επίσης να καθορίσουμε το `-b master` ή οποιονδήποτε κλάδο περιλαμβάνεται επειδή αλλιώς δεν θα ξέρει τι κλάδο να ελέγξει έξω.
92+
93+
Τώρα ας υποθέσουμε ότι κάνουμε τρεις υποβολές σε αυτό και θέλουμε να στείλουμε τις νέες υποβολές πίσω μέσω μιας δέσμης σε ένα stick USB ή ένα ηλεκτρονικό ταχυδρομείο.
94+
6895
Now let's say you do three commits on it and want to send the new commits back via a bundle on a USB stick or email.
6996

7097
[source,console]
@@ -81,6 +108,15 @@ First we need to determine the range of commits we want to include in the bundle
81108
Unlike the network protocols which figure out the minimum set of data to transfer over the network for us, we'll have to figure this out manually.
82109
Now, you could just do the same thing and bundle the entire repository, which will work, but it's better to just bundle up the difference - just the three commits we just made locally.
83110

111+
Πρώτα πρέπει να καθορίσουμε το εύρος υποβολών που θέλουμε να συμπεριλάβουμε στη δέσμη.
112+
Σε αντίθεση με τα πρωτόκολλα δικτύου που καθορίζουν το ελάχιστο σύνολο δεδομένων που θα μεταφερθούν μέσω του δικτύου για εμάς, θα πρέπει να το καταλάβουμε χειροκίνητα.
113+
 Τώρα, θα μπορούσαμε να κάνουμε το ίδιο πράγμα και να συνδέσουμε ολόκληρο το αποθετήριο, το οποίο θα λειτουργήσει, αλλά είναι καλύτερα να συνδυάσουμε τη διαφορά --ακριβώς τις τρεις υποβολές που κάναμε τοπικά.
114+
115+
Για να γίνει αυτό, θα πρέπει να υπολογίσουμε τη διαφορά.
116+
Όπως περιγράψαμε στο <<_commit_ranges>>, μπορούμε να καθορίσουμε μια σειρά υποβολών με διάφορους τρόπους.
117+
Για να πάρουμε τις τρεις υποβολές που έχουμε στον κύριο κλάδο μας που δεν ήταν στον κλάδο που αρχικά κλωνοποιήσαμε, μπορούμε να χρησιμοποιήσουμε κάτι σαν `origine / master..master` ή 'master ^ origin / master`.
118+
Μπορούμε να το δοκιμάσουμε με την εντολή `log`.
119+
84120
In order to do that, you'll have to calculate the difference.
85121
As we described in <<_commit_ranges>>, you can specify a range of commits in a number of ways.
86122
To get the three commits that we have in our master branch that weren't in the branch we originally cloned, we can use something like `origin/master..master` or `master ^origin/master`.
@@ -94,6 +130,9 @@ c99cf5b fourth commit - second repo
94130
7011d3d third commit - second repo
95131
----
96132

133+
Τώρα λοιπόν που έχουμε τον κατάλογο των υποβολών που θέλουμε να συμπεριλάβουμε στη δέσμη, ας τις συσσωρεύσουμε.
134+
Το κάνουμε αυτό με την εντολή `git bundle create`, δίνοντάς του ένα όνομα αρχείου που θέλουμε να είναι το πακέτο μας και το φάσμα των υποβολών που θέλουμε να το κάνουμε.
135+
97136
So now that we have the list of commits we want to include in the bundle, let's bundle them up.
98137
We do that with the `git bundle create` command, giving it a filename we want our bundle to be and the range of commits we want to go into it.
99138

@@ -110,6 +149,12 @@ Total 9 (delta 0), reused 0 (delta 0)
110149
Now we have a `commits.bundle` file in our directory.
111150
If we take that and send it to our partner, she can then import it into the original repository, even if more work has been done there in the meantime.
112151

152+
Τώρα έχουμε ένα αρχείο `commits.bundle` στον κατάλογό μας.
153+
Αν το πάρουμε αυτό και θα το στείλουμε στον συνεργάτη μας, τότε μπορεί να το εισάγει στο αρχικό αποθετήριο, ακόμα κι αν έχει γίνει περισσότερη δουλειά εκεί εν τω μεταξύ.
154+
155+
Όταν παίρνει τη δέσμη, μπορεί να το επιθεωρήσει για να δει τι περιέχει πριν την εισάγει στο αποθετήριο της.
156+
Η πρώτη εντολή είναι η εντολή `verify bundle 'που θα βεβαιωθεί ότι το αρχείο είναι στην πραγματικότητα μια έγκυρη δέσμη Git και ότι έχουμε όλους τους απαραίτητους προγόνους για να την ανασυστήσουμε σωστά.
157+
113158
When she gets the bundle, she can inspect it to see what it contains before she imports it into her repository.
114159
The first command is the `bundle verify` command that will make sure the file is actually a valid Git bundle and that you have all the necessary ancestors to reconstitute it properly.
115160

@@ -123,6 +168,9 @@ The bundle requires these 1 ref
123168
../commits.bundle is okay
124169
----
125170

171+
Αν ο παγιδευτής είχε δημιουργήσει μια δέσμη μόνο των δύο τελευταίων υποβολών που είχαν πράξει, και όχι και οι τρεις, ο αρχικός χώρος αποθήκευσης δεν θα μπορούσε να το εισαγάγει, δεδομένου ότι λείπει η απαιτούμενη ιστορία.
172+
Η εντολή `verify 'θα έμοιαζε έτσι:
173+
126174
If the bundler had created a bundle of just the last two commits they had done, rather than all three, the original repository would not be able to import it, since it is missing requisite history.
127175
The `verify` command would have looked like this instead:
128176

@@ -133,6 +181,9 @@ error: Repository lacks these prerequisite commits:
133181
error: 7011d3d8fc200abe0ad561c011c3852a4b7bbe95 third commit - second repo
134182
----
135183

184+
Ωστόσο, η πρώτη μας δέσμη είναι έγκυρη, έτσι μπορούμε να φέρουμε υποβολές από αυτήν.
185+
Αν θέλουμε να δούμε ποιοι κλάδοι βρίσκονται στη δέσμη που μπορεί να εισαχθεί, υπάρχει επίσης μια εντολή για τη λίστα των κεφαλών:
186+
136187
However, our first bundle is valid, so we can fetch in commits from it.
137188
If you want to see what branches are in the bundle that can be imported, there is also a command to just list the heads:
138189

@@ -142,6 +193,10 @@ $ git bundle list-heads ../commits.bundle
142193
71b84daaf49abed142a373b6e5c59a22dc6560dc refs/heads/master
143194
----
144195

196+
Η δευτερεύουσα εντολή `verify` θα μας πει και τα κεφάλια.
197+
Το σημείο είναι να δούμε τι μπορεί να τραβηχτεί, ώστε να μπορούμε να χρησιμοποιήσουμε τις εντολές `fetch` ή` pull` για να εισάγουμε υποβολές από αυτή τη δέσμη.
198+
Εδώ θα φέρουμε τον «κύριο» κλάδο της δέσμης σε έναν κλάδο που ονομάζεται «άλλος-κύριος» στο αποθετήριο μας:
199+
145200
The `verify` sub-command will tell you the heads as well.
146201
The point is to see what can be pulled in, so you can use the `fetch` or `pull` commands to import commits from this bundle.
147202
Here we'll fetch the 'master' branch of the bundle to a branch named 'other-master' in our repository:
@@ -153,6 +208,8 @@ From ../commits.bundle
153208
* [new branch] master -> other-master
154209
----
155210

211+
Τώρα μπορούμε να δούμε ότι έχουμε τις εισαγόμενες υποβολές στον κλάδο «άλλου κύριου» καθώς και τις υποβολές που έχουμε κάνει εν τω μεταξύ στο δικό μας «κύριο» κλάδο.
212+
156213
Now we can see that we have the imported commits on the 'other-master' branch as well as any commits we've done in the meantime in our own 'master' branch.
157214

158215
[source,console]
@@ -167,4 +224,6 @@ $ git log --oneline --decorate --graph --all
167224
* b1ec324 first commit
168225
----
169226

227+
Έτσι, το `git bundle` μπορεί να είναι πραγματικά χρήσιμο για να μοιραστούμε ή να κάνουμε πράξεις τύπου δικτύου όταν δεν έχουμε το κατάλληλο δίκτυο ή κοινόχρηστο αποθετήριο για να το κάνουμε αυτό.
228+
170229
So, `git bundle` can be really useful for sharing or doing network-type operations when you don't have the proper network or shared repository to do so.

0 commit comments

Comments
 (0)