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/03-git-branching/sections/branch-management.asc
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
=== Branch Management
3
3
4
4
(((branches, managing)))
5
-
Now that you've created, merged, and deleted some branches, let's look at some branch-management tools that will come in handy when you begin using branches all the time.
5
+
Τώρα που έχουμε δημιουργήσει, συγχωνεύσει και διαγράψει μερικούς κλάδους, ας δούμε μερικά εργαλεία διαχείρισης κλάδων που θα μας είναι χρήσιμα όταν αρχίσουμε να χρησιμοποιούμε κλάδους συνεχώς.
6
6
7
-
The `git branch` command does more than just create and delete branches.(((git commands, branch)))
8
-
If you run it with no arguments, you get a simple listing of your current branches:
7
+
Η εντολή `git branch` εκτός από το να δημιουργεί και να διαγράφει κλάδους κάνει και κάποια άλλα πράγματα.(((git commands, branch)))
8
+
Αν την τρέξουμε χωρίς ορίσματα, τότε παίρνουμε μία λίστα όλων των κλάδων:
9
9
10
10
[source,console]
11
11
----
@@ -15,9 +15,9 @@ $ git branch
15
15
testing
16
16
----
17
17
18
-
Notice the `*` character that prefixes the `master` branch: it indicates the branch that you currently have checked out (i.e., the branch that `HEAD` points to).
19
-
This means that if you commit at this point, the `master` branch will be moved forward with your new work.
20
-
To see the last commit on each branch, you can run `git branch -v`:
18
+
Ο χαρακτήρας `*` πριν από τον κλάδο `master` επισημαίνει ότι ο κλάδος αυτός είναι ο τρέχων κλάδος, δηλαδή ο κλάδος στον οποίο δείχνει ο δείκτης `HEAD`).
19
+
Αυτό σημαίνει ότι αν κάνουμε μία υποβολή σε αυτό το σημείο, ο κλάδος `master` θα προχωρήσει.
20
+
Για να δούμε την τελευταία υποβολή του κάθε κλάδου μπορούμε να τρέξουμε την εντολή `git branch -v`:
21
21
22
22
[source,console]
23
23
----
@@ -27,8 +27,8 @@ $ git branch -v
27
27
testing 782fd34 add scott to the author list in the readmes
28
28
----
29
29
30
-
The useful `--merged` and `--no-merged` options can filter this list to branches that you have or have not yet merged into the branch you're currently on.
31
-
To see which branches are already merged into the branch you're on, you can run `git branch --merged`:
30
+
Οι επιλογές `--merged` και `--no-merged` φιλτράρουν την λίστα των κλάδων και κρατούν μόνον όσους κλάδους έχουν και δεν έχουν ακόμα συγχωνευτεί με τον τρέχοντα κλάδο.
31
+
Για να δούμε ποιοι κλάδοι έχουν ήδη συγχωνευτεί με τον τρέχοντα κλάδο, τρέχουμε την εντολή `git branch --merged`:
32
32
33
33
[source,console]
34
34
----
@@ -37,19 +37,19 @@ $ git branch --merged
37
37
* master
38
38
----
39
39
40
-
Because you already merged in `iss53` earlier, you see it in your list.
41
-
Branches on this list without the `*` in front of them are generally fine to delete with `git branch -d`; you've already incorporated their work into another branch, so you're not going to lose anything.
40
+
Επειδή είχαμε ήδη συγχωνεύσει τον κλάδο `iss53` προηγουμένως, φαίνεται στην λίστα μας.
41
+
Γενικά είναι ασφαλές να διαγράψουμε τους κλάδους σε αυτήν την λίστα που δεν έχουν το `*` χρησιμοποιώντας την εντολή `git branch -d`· έχουμε ήδη ενσωματώσει τις αλλαγές τους σε κάποιον άλλο κλάδο, συνεπώς δεν πρόκειται να χάσουμε τίποτα.
42
42
43
-
To see all the branches that contain work you haven't yet merged in, you can run `git branch --no-merged`:
43
+
Για αν σούμε όλους τους κλάδους που περιέχουν εργασία που δεν έχουμε συγχωνεύσει σε κάποιον άλλο κλάδο ακόμα, μπορούμε να τρέξουμε την εντολή `git branch --no-merged`:
44
44
45
45
[source,console]
46
46
----
47
47
$ git branch --no-merged
48
48
testing
49
49
----
50
50
51
-
This shows your other branch.
52
-
Because it contains work that isn't merged in yet, trying to delete it with `git branch -d` will fail:
51
+
Αυτή μας δείχνει τον άλλο κλάδο.
52
+
Επειδή αυτός ο κλάδος περιέχει δουλειά που δεν έχει ακόμα συγχωνευτεί σε κάποιον άλλο κλάδο, αν αποπειραθούμε να τον διαγράψουμε με την εντολή `git branch -d` θα αποτύχουμε:
53
53
54
54
[source,console]
55
55
----
@@ -58,4 +58,5 @@ error: The branch 'testing' is not fully merged.
58
58
If you are sure you want to delete it, run 'git branch -D testing'.
59
59
----
60
60
61
-
If you really do want to delete the branch and lose that work, you can force it with `-D`, as the helpful message points out.
61
+
Αν πραγματικά θέλετε να διαγράψετε έναν τέτοιο κλάδο και να χάσετε την δουλειά που περιέχει, μπορείτε να επιβάλετε την διαγραφή με την επιλογή `-D`, όπως υποδεικνύει και το παραπάνω μήνυμα.
0 commit comments