Skip to content

Commit 047c9d2

Browse files
committed
Translated section 10.5
1 parent b9013f5 commit 047c9d2

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[[_refspec]]
2-
=== The Refspec
2+
=== Το Refspec
33

4-
Throughout this book, we've used simple mappings from remote branches to local references, but they can be more complex.
5-
Suppose you add a remote like this:
4+
Σε αυτό το βιβλίο, χρησιμοποιήσαμε απλές απεικονίσεις από απομακρυσμένους κλάδους σε τοπικές αναφορές, αλλά οι απεικονίσεις είναι δυνατό να είναι πιο σύνθετες.
5+
Ας υποθέσουμε ότι προσθέτουμε ένα απομακρυσμένο σύστημα όπως αυτό:
66

77
[source,console]
88
----
99
$ git remote add origin https://github.com/schacon/simplegit-progit
1010
----
1111

12-
It adds a section to your `.git/config` file, specifying the name of the remote (`origin`), the URL of the remote repository, and the refspec for fetching:
12+
Η παραπάνω προσθέτει μια ενότητα στο αρχείο `.git/config`, καθορίζοντας το όνομα του απομακρυσμένου αποθετηρίου (`origin`), τη διεύθυνση URL του και το refspec για την ανάκτηση:
1313

1414
[source,ini]
1515
----
@@ -18,11 +18,11 @@ It adds a section to your `.git/config` file, specifying the name of the remote
1818
fetch = +refs/heads/*:refs/remotes/origin/*
1919
----
2020

21-
The format of the refspec is an optional `+`, followed by `<src>:<dst>`, where `<src>` is the pattern for references on the remote side and `<dst>` is where those references will be written locally.
22-
The `+` tells Git to update the reference even if it isn't a fast-forward.
21+
Η μορφή του refspec είναι ένα προαιρετικό `+`, ακολουθούμενο από `<src>:<dst>`, όπου `<src>` είναι το πρότυπο για αναφορές στην απομακρυσμένη πλευρά και `<dst>` είναι πού θα γραφούν οι αναφορές αυτές τοπικά.
22+
Το `+` λέει στο Git να ενημερώσει την αναφορά ακόμα κι αν δεν πρόκειται για ταχυπροώθηση.
2323

24-
In the default case that is automatically written by a `git remote add` command, Git fetches all the references under `refs/heads/` on the server and writes them to `refs/remotes/origin/` locally.
25-
So, if there is a `master` branch on the server, you can access the log of that branch locally via
24+
Στην προεπιλεγμένη περίπτωση που γράφεται αυτόματα από μια εντολή `git remote add`, το Git συγκεντρώνει όλες τις αναφορές κάτω από τον `refs/heads/` του διακομιστή και τις γράφει στον `refs/remotes/origin/` τοπικά.
25+
Επομένως, εάν υπάρχει ένας κλάδος `master` στον διακομιστή, μπορούμε να έχουμε πρόσβαση στο μητρώο αυτού του κλάδου τοπικά μέσω
2626

2727
[source,console]
2828
----
@@ -31,26 +31,26 @@ $ git log remotes/origin/master
3131
$ git log refs/remotes/origin/master
3232
----
3333

34-
They're all equivalent, because Git expands each of them to `refs/remotes/origin/master`.
34+
Όλες είναι ισοδύναμες, διότι το Git επεκτείνει το καθένα σε `refs/remotes/origin/master`.
3535

36-
If you want Git instead to pull down only the `master` branch each time, and not every other branch on the remote server, you can change the fetch line to
36+
Εάν θέλουμε το Git αντί να έλκει μόνο τον κλάδο `master` κάθε φορά και όχι κάθε άλλο κλάδο από τον απομακρυσμένο διακομιστή, μπορούμε να αλλάξουμε τη γραμμή παραλαβής σε
3737

3838
[source]
3939
----
4040
fetch = +refs/heads/master:refs/remotes/origin/master
4141
----
4242

43-
This is just the default refspec for `git fetch` for that remote.
44-
If you want to do something one time, you can specify the refspec on the command line, too.
45-
To pull the `master` branch on the remote down to `origin/mymaster` locally, you can run
43+
Αυτό είναι μόνο το προεπιλεγμένο refspec για την `git fetch` για αυτό το απομακρυσμένο αποθετήριο.
44+
Αν θέλουμε να κάνουμε κάτι μία φορά, μπορούμε να καθορίσουμε το refspec στη γραμμή εντολών.
45+
Για να έλξουμε τον κλάδο `master` του απομακρυσμένου αποθετηρίου στον τοπικό `origin/mymaster`, μπορούμε να τρέξουμε
4646

4747
[source,console]
4848
----
4949
$ git fetch origin master:refs/remotes/origin/mymaster
5050
----
5151

52-
You can also specify multiple refspecs.
53-
On the command line, you can pull down several branches like so:
52+
Μπορούμε επίσης να ορίσουμε πολλά refspecs.
53+
Στη γραμμή εντολών, μπορούμε να έλξουμε αρκετούς κλάδους ως εξής:
5454

5555
[source,console]
5656
----
@@ -61,11 +61,10 @@ From [email protected]:schacon/simplegit
6161
* [new branch] topic -> origin/topic
6262
----
6363

64-
In this case, the master branch pull was rejected because it wasn't a fast-forward reference.
65-
You can override that by specifying the `+` in front of the refspec.
64+
Σε αυτήν την περίπτωση, η έλξη του κλάδου `master` απορρίφθηκε επειδή δεν ήταν αναφορά ταχυπροώθησης. Μπορούμε να παρακάμψουμε αυτήν τη συμπεριφορά βάζοντας το `+` μπροστά από το refspec.
6665

67-
You can also specify multiple refspecs for fetching in your configuration file.
68-
If you want to always fetch the master and experiment branches, add two lines:
66+
Μπορούμε επίσης να ορίσουμε πολλά refspec για ανάκτηση στο αρχείο ρυθμίσεων.
67+
Αν θέλουμε πάντα να ανακτούμε τους κύριους και πειραματικούς κλάδους προσθέτουμε αυτές τις δύο γραμμές:
6968

7069
[source,ini]
7170
----
@@ -75,15 +74,16 @@ If you want to always fetch the master and experiment branches, add two lines:
7574
fetch = +refs/heads/experiment:refs/remotes/origin/experiment
7675
----
7776

77+
ΧΧΧΔεν μπορούμε να χρησιμοποιήσουμε μερικά σφαιρίδια στο μοτίβο, επομένως το παρακάτω δεν είναι έγκυρη έκφραση:
7878
You can't use partial globs in the pattern, so this would be invalid:
7979

8080
[source]
8181
----
8282
fetch = +refs/heads/qa*:refs/remotes/origin/qa*
8383
----
8484

85-
However, you can use namespaces (or directories) to accomplish something like that.
86-
If you have a QA team that pushes a series of branches, and you want to get the master branch and any of the QA team's branches but nothing else, you can use a config section like this:
85+
Πάντως, μπορούμε να χρησιμοποιήσουμε ονοματοχώρους (ή καταλόγους) για να πετύχουμε κάτι τέτοιο.
86+
Εάν έχουμε μια ομάδα QA που ωθεί μια σειρά από κλάδους και θέλουμε να πάρουμε το κύριο κλάδο και οποιοδήποτε από τους κλάδους της ομάδας QA αλλά τίποτα άλλο, μπορούμε να χρησιμοποιήσουμε μια ενότητα config όπως αυτή:
8787

8888
[source,ini]
8989
----
@@ -93,22 +93,22 @@ If you have a QA team that pushes a series of branches, and you want to get the
9393
fetch = +refs/heads/qa/*:refs/remotes/origin/qa/*
9494
----
9595

96-
If you have a complex workflow process that has a QA team pushing branches, developers pushing branches, and integration teams pushing and collaborating on remote branches, you can namespace them easily this way.
96+
Εάν έχουμε μια πολύπλοκη ροή εργασίας που διαθέτει μια ομάδα QA που ωθεί κλάδους, προγραμματιστές που ωθούν κλάδους και ομάδες ενσωμάτωσης που ωθούν και συνεργάζονται σε απομακρυσμένα κλάδους, μπορούμε να τους χωρίσουμε σε ονοματοχώρους με αυτό τον τρόπο.
9797

9898
[[_pushing_refspecs]]
99-
==== Pushing Refspecs
99+
==== Ώθηση refspecs
100100

101-
It's nice that you can fetch namespaced references that way, but how does the QA team get their branches into a `qa/` namespace in the first place?
102-
You accomplish that by using refspecs to push.
101+
Είναι ωραίο ότι μπορούμε να ανακτήσουμε αναφορές εντός ονοματοχώρων με αυτόν τον τρόπο, αλλά πώς μπόρεσε η ομάδα QA να βάλει όλους τους κλάδους της σε έναν ονοματοχώρο `qa/`;
102+
Αυτό το πετυχαίνουμε χρησιμοποιώντας refspec για να ωθήσουμε.
103103

104-
If the QA team wants to push their `master` branch to `qa/master` on the remote server, they can run
104+
Εάν η ομάδα QA θέλει να ωθήσει τον κλάδο `master` στον `qa/master` στον απομακρυσμένο διακομιστή, μπορεί να τρέξει
105105

106106
[source,console]
107107
----
108108
$ git push origin master:refs/heads/qa/master
109109
----
110110

111-
If they want Git to do that automatically each time they run `git push origin`, they can add a `push` value to their config file:
111+
Αν θέλουν να το κάνει το Git αυτόματα κάθε φορά που τρέχουν την `git push origin`, μπορούν να προσθέσουν μια τιμή `push` στο αρχείο config:
112112

113113
[source,ini]
114114
----
@@ -118,15 +118,16 @@ If they want Git to do that automatically each time they run `git push origin`,
118118
push = refs/heads/master:refs/heads/qa/master
119119
----
120120

121-
Again, this will cause a `git push origin` to push the local `master` branch to the remote `qa/master` branch by default.
121+
Και πάλι, αυτό θα προκαλέσει μια `git push origin` να ωθήσει τον τοπικό κλάδο `master` στον απομακρυσμένο κλάδο `qa/master` εκ προεπιλογής.
122122

123-
==== Deleting References
123+
==== Διαγραφή αναφορών
124124

125-
You can also use the refspec to delete references from the remote server by running something like this:
125+
Μπορούμε επίσης να χρησιμοποιήσουμε το refspec για να διαγράψουμε αναφορές από τον απομακρυσμένο διακομιστή εκτελώντας κάτι σαν αυτό:
126126

127127
[source,console]
128128
----
129129
$ git push origin :topic
130130
----
131131

132-
Because the refspec is `<src>:<dst>`, by leaving off the `<src>` part, this basically says to make the topic branch on the remote nothing, which deletes it.
132+
Επειδή το refspec είναι `<src>:<dst>`, αν αφήσουμε το τμήμα `<src>`, αυτό ουσιαστικά λέει ``κάνε τον θεματικό κλάδο στο απομακρυσμένο αποθετήριο, τίποτα'', οπότε το διαγράφει.
133+

0 commit comments

Comments
 (0)