Skip to content

Commit 479b5b1

Browse files
committed
Chapter 2 finished.
1 parent 93eba0f commit 479b5b1

File tree

3 files changed

+47
-48
lines changed

3 files changed

+47
-48
lines changed

book/02-git-basics/sections/aliases.asc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[[_git_aliases]]
2-
=== Git Aliases
2+
=== Συντομεύεσεις στο Git
33

44
(((aliases)))
5-
Before we finish this chapter on basic Git, there's just one little tip that can make your Git experience simpler, easier, and more familiar: aliases.
6-
We won't refer to them or assume you've used them later in the book, but you should probably know how to use them.
5+
Πριν τελειώσουμε το κεφάλαιο αυτό, υπάρχει μια μικρή συμβουλή που μπορείτε να ακολουθήσετε για να κάνετε την εμπειρία σας με το Git πιο απλή: χρησιμοποιήστε τις συντομεύσεις.
6+
Δεν θα αναφερθούμε για αυτές στη συνέχεια του βιβλίου αλλά καλό θα ήταν να ξέρετε πως να τις χρησιμοποιείτε.
77

8-
Git doesn't automatically infer your command if you type it in partially.
9-
If you don't want to type the entire text of each of the Git commands, you can easily set up an alias for each command using `git config`.(((git commands, config)))
10-
Here are a couple of examples you may want to set up:
8+
Το Git μπορεί να καταλάβει μια εντολή μόνο αν την γράψετε ολόκληρη.
9+
Αν δεν θέλετε να πληκτρολογήσετε όλα τα γράμματα μιας εντολής, μπορείτε να ορίσετε μια συντόμευση για κάθε εντολή χρησιμοποιώντας την `git config`.(((git commands, config)))
10+
Μερικά παραδείγματα για το πως μπορείτε να ορίσετε μερικές συντομεύσεις:
1111

1212
[source,console]
1313
----
@@ -17,34 +17,34 @@ $ git config --global alias.ci commit
1717
$ git config --global alias.st status
1818
----
1919

20-
This means that, for example, instead of typing `git commit`, you just need to type `git ci`.
21-
As you go on using Git, you'll probably use other commands frequently as well; don't hesitate to create new aliases.
20+
Αυτό σημαίναι ότι μπορείτε, για παράδειγμα, να πληκτρολογήσετε `git ci` αντί για `git commit`.
21+
Καθώς χρησιμοποιείτε το Git, θα δείτε ότι υπάρχουν και άλλες εντολές που χρησιμοποιείτε συχνά. Μην παραλείψετε να δημιουργήσετε συντομεύσεις και για αυτές.
2222

23-
This technique can also be very useful in creating commands that you think should exist.
24-
For example, to correct the usability problem you encountered with unstaging a file, you can add your own unstage alias to Git:
23+
Η τεχνική αυτή μπορεί να φανεί χρήσιμη για εντολές που πιστεύετε ότι θα έπρεπε να υπήρχαν.
24+
Για παράδειγμα, αν θέλετε να κάνετε πιο εύχρηστη την διαδικασία ακύρωσης καταχώρησης ενός αρχείου, μπορείτε να δημιουργήσετε μια συντόμευση για αυτή:
2525

2626
[source,console]
2727
----
2828
$ git config --global alias.unstage 'reset HEAD --'
2929
----
3030

31-
This makes the following two commands equivalent:
31+
Με αυτόν τον τρόπο, οι δύο παρακάτω εντολές γίνονται ισοδύναμες:
3232

3333
[source,console]
3434
----
3535
$ git unstage fileA
3636
$ git reset HEAD fileA
3737
----
3838

39-
This seems a bit clearer.
40-
It's also common to add a `last` command, like this:
39+
Η εντολή που εκτελούμε φαίνεται πλέον πιο καθαρά.
40+
Η συντόμευση `last` είναι επίσης πολύ συνηθισμένη:
4141

4242
[source,console]
4343
----
4444
$ git config --global alias.last 'log -1 HEAD'
4545
----
4646

47-
This way, you can see the last commit easily:
47+
Με τον τρόπο αυτό μπορείτε να δείτε εύκολα την τελευταία υποβολή:
4848

4949
[source,console]
5050
----
@@ -58,11 +58,11 @@ Date: Tue Aug 26 19:48:51 2008 +0800
5858
Signed-off-by: Scott Chacon <[email protected]>
5959
----
6060

61-
As you can tell, Git simply replaces the new command with whatever you alias it for.
62-
However, maybe you want to run an external command, rather than a Git subcommand.
63-
In that case, you start the command with a `!` character.
64-
This is useful if you write your own tools that work with a Git repository.
65-
We can demonstrate by aliasing `git visual` to run `gitk`:
61+
Όπως μπορείτε να δείτε, το Git μπορεί να αντικαταστήσει μια εντολή με οποιαδήποτε συντόμευση ορίσετε.
62+
Παρ' όλα αυτά, μπορεί αντί για μια εντολή του Git, να θέλετε να εκτελέσετε μια εξωτερική εντολή.
63+
Στην περίπτωση αυτή, θα πρέπει να ξεκινήσετε την εντολή με τον χαρακτήρα του θαυμαστικού, `!`.
64+
Αυτό θα σας φανεί χρήσιμο αν χρησιμοποείτε εργαλεία που δουλεύουν με αποθετήρια Git.
65+
Για παράδειγμα, μπορούμε να χρησιμοποιήσουμε την συντόμευση `git visual` για να εκτελέσουμε την εντολή `gitk`:
6666

6767
[source,console]
6868
----

book/02-git-basics/sections/tagging.asc

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ Date: Mon Mar 17 21:52:11 2008 -0700
8787
changed the version number
8888
----
8989

90-
Η εντολή αυτή μας δείχνει πληροφορίες για τον χρήστη που έβαλε την ετικέτα, την ημερομηνία που χρησιμοποιήθηκε η ετικέτα στην υποβολή, καθώς και το μήνυμα της ετικέτας.
90+
Η εντολή αυτή μας δείχνει πληροφορίες για τον χρήστη που έβαλε την ετικέτα, την ημερομηνία που χρησιμοποιήθηκε η ετικέτα στην υποβολή, καθώς και το μήνυμά της.
9191

92-
==== Lightweight Tags
92+
==== Ελαφρείς ετικέτες
9393

9494
(((tags, lightweight)))
95-
Another way to tag commits is with a lightweight tag.
96-
This is basically the commit checksum stored in a file – no other information is kept.
97-
To create a lightweight tag, don't supply the `-a`, `-s`, or `-m` option:
95+
Ένας άλλος τρόπος για να βάλετε ετικέτες στις υποβολές είναι οι ελαφρείς ετικέτες.
96+
Η ετικέτα δεν περιλαμβάνει καμία περαιτέρω πληροφορία εκτός από το checksum της υποβολής σας.
97+
Για να δημιουργήσετε μια τέτοια ετικέτα, θα πρέπει να μην χρησιμοποιήσετε τις επιλογές `-a`, `-s`, ή `-m`:
9898

9999
[source,console]
100100
----
@@ -107,8 +107,8 @@ v1.4-lw
107107
v1.5
108108
----
109109

110-
This time, if you run `git show` on the tag, you don't see the extra tag information.(((git commands, show)))
111-
The command just shows the commit:
110+
Αν τώρα εκτελέσετε την εντολή `git show` για την συγκεκριμένη ετικέτα, δεν θα δείτε τις επιπλέον πληροφορίες μιας ετικέτας.(((git commands, show)))
111+
Η εντολή θα μας δείξει απλά την υποβολή:
112112

113113
[source,console]
114114
----
@@ -120,10 +120,10 @@ Date: Mon Mar 17 21:52:11 2008 -0700
120120
changed the version number
121121
----
122122

123-
==== Tagging Later
123+
==== Αναθέτοντας ετικέτες αργότερα
124124

125-
You can also tag commits after you've moved past them.
126-
Suppose your commit history looks like this:
125+
Μπορείτε επίσης να αναθέσετε ετικέτες σε παλαιότερες υποβολές.
126+
Έστω λοιπόν ότι το ιστορικό υποβολών σας είναι κάπως έτσι:
127127

128128
[source,console]
129129
----
@@ -140,16 +140,15 @@ a6b4c97498bd301d84096da251c98a07c7723e65 beginning write support
140140
8a5cbc430f1a9c3d00faaeffd07798508422908a updated readme
141141
----
142142

143-
Now, suppose you forgot to tag the project at v1.2, which was at the ``updated rakefile'' commit.
144-
You can add it after the fact.
145-
To tag that commit, you specify the commit checksum (or part of it) at the end of the command:
143+
Ας υποθέσουμε τώρα ότι ξεχάσατε να βάλετε ετικέτα στο άργο σας στην έκδοση 1.2 που ήταν η υποβολή με το μήνυμα ``updated rakefile''.
144+
Μπορείτε να βάλετε την ετικέτα όποτε θέλετε. Για να το κάνετε αυτό, θα πρέπει να προσδιορίσετε το checksum της υποβολής σας (ή ένα μέρος του) στο τέλος της εντολής:
146145

147146
[source,console]
148147
----
149148
$ git tag -a v1.2 9fceb02
150149
----
151150

152-
You can see that you've tagged the commit:(((git commands, tag)))
151+
Μπορείτε τώρα να δείτε ότι έχετε προσθέσει την ετικέτα στην υποβολή:(((git commands, tag)))
153152

154153
[source,console]
155154
----
@@ -176,11 +175,11 @@ Date: Sun Apr 27 20:43:35 2008 -0700
176175
----
177176

178177
[[_sharing_tags]]
179-
==== Sharing Tags
178+
==== Κοινωποιώντας τις ετικέτες
180179

181-
By default, the `git push` command doesn't transfer tags to remote servers.(((git commands, push)))
182-
You will have to explicitly push tags to a shared server after you have created them.
183-
This process is just like sharing remote branches – you can run `git push origin [tagname]`.
180+
Από προεπιλογή, η εντολή `git push` δεν μεταφέρει ετικέτες στους διακομιστές.(((git commands, push)))
181+
Θα πρέπει να ορίσετε σαφώς ότι θέλετε να ωθήσσετε τις ετικέτες στον διακομιστή, αφού πρώτα τις δημιουργήσετε.
182+
Η διαδικασία αυτή είναι παρόμοια με το να κοινωποιείτε απομακρυσμένους κλάδους. Θα πρέπει λοιπόν να εκτελέσουμε την εντολή `git push origin [tagname]`.
184183

185184
[source,console]
186185
----
@@ -194,8 +193,8 @@ To [email protected]:schacon/simplegit.git
194193
* [new tag] v1.5 -> v1.5
195194
----
196195

197-
If you have a lot of tags that you want to push up at once, you can also use the `--tags` option to the `git push` command.
198-
This will transfer all of your tags to the remote server that are not already there.
196+
Αν έχετε πολλές ετικέτες που θέλετε να ωθήσετε με τη μία, μπορείτε επίσης να χρησιμοποιήσετε την επιλογή `--tags` στην εντολή `git push`.
197+
Με τον τρόπο αυτό θα μεταφέρετε στον διακομιστή όλες τις ετικέτες που δεν είναι ήδη εκεί.
199198

200199
[source,console]
201200
----
@@ -208,17 +207,17 @@ To [email protected]:schacon/simplegit.git
208207
* [new tag] v1.4-lw -> v1.4-lw
209208
----
210209

211-
Now, when someone else clones or pulls from your repository, they will get all your tags as well.
210+
Έπειτα, όταν κάποιος κλωνοποιήσει ή τραβήξει δεδομένα από το αποθετήριό σας, θα λάβει μαζί και όλες τις υπάρχουσες ετικέτες.
212211

213-
==== Checking out Tags
212+
==== Ενημερώνοντας τις ετικέτες
214213

215-
You can't really check out a tag in Git, since they can't be moved around.
216-
If you want to put a version of your repository in your working directory that looks like a specific tag, you can create a new branch at a specific tag with `git checkout -b [branchname] [tagname]`:
214+
Λόγω του γεγονότος ότι οι ετικέτες δεν μπορούν να μετακινηθούν, δεν μπορούμε να κάνουμε κανονική ενημέρωση του αποθετηρίου μας με βάση μια ετικέτα.
215+
Αν θέλετε να βάλετε μια έκδοση του αποθετηρίου σας στον κατάλογο εργασίας σας, η οποία να μοιάζει με μια συγκεκριμένη ετικέτα, μπορείτε να δημιουργήσετε έναν καινούριο κλάδο σε μια συγκεριμένη ετικέτα με την εντολή `git checkout -b [branchname] [tagname]`:
217216

218217
[source,console]
219218
----
220219
$ git checkout -b version2 v2.0.0
221220
Switched to a new branch 'version2'
222221
----
223222

224-
Of course if you do this and do 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.
223+
Αν βέβαια εκτελέσετε την παραπάνω εντολή και πραγματοποιήσετε μια υποβολή, ο κλάδος `version2` θα είναι λίγο διαφορετικός από την ετικέτα `v2.0.0` καθώς θα περιλαμβάνει και τις καινούριες σας αλλαγές.

status.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
},
1616
"02-git-basics": {
1717
"1-git-basics.asc": 100,
18-
"sections/aliases.asc": 0,
18+
"sections/aliases.asc": 100,
1919
"sections/getting-a-repository.asc": 100,
2020
"sections/recording-changes.asc": 100,
21-
"sections/remotes.asc": 0,
22-
"sections/tagging.asc": 0,
23-
"sections/undoing.asc": 0,
21+
"sections/remotes.asc": 100,
22+
"sections/tagging.asc": 100,
23+
"sections/undoing.asc": 100,
2424
"sections/viewing-history.asc": 100
2525
},
2626
"03-git-branching": {

0 commit comments

Comments
 (0)