Github: Δημιουργία και διακλάδωση συγχρονισμού
Μια κεντρική λειτουργία στο Github είναι η "φουρκέτα", με την οποία μπορείτε να συνεισφέρετε σε υπάρχοντα αναπτυξιακά έργα.
Github: Τι είναι ένα πιρούνι;
Το πιρούνι είναι ένα σχίσμα από το δέντρο πηγαίου κώδικα ενός έργου, στο οποίο μπορείτε να κάνετε τις δικές σας αλλαγές. Η λειτουργικότητα και η ποιότητα του βασικού πηγαίου κώδικα δεν επηρεάζεται. Το πιρούνι είναι ένα τοπικό αντίγραφο όπου μπορείτε να πειραματιστείτε με τον κώδικα σαν να βρίσκεστε σε ασφαλές περιβάλλον. Εάν έχετε ολοκληρώσει την αλλαγή σας και θέλετε να την ενσωματώσετε στο συγκεκριμένο έργο, χρησιμοποιήστε ένα "αίτημα έλξης".
Δημιουργήστε ένα πιρούνι στο Github
Με τα παρακάτω σύντομα βήματα δημιουργείτε ένα πιρούνι στο gibthub:
- Πλοηγηθείτε στο έργο πηγαίου κώδικα στο οποίο θέλετε να συμμετάσχετε.
- Μετά την επιτυχή σύνδεση μπορείτε τώρα να κάνετε κλικ στο πλήκτρο "Πιρούνι".
- Ο Github δημιουργεί τώρα ένα αντίγραφο του σχετικού αποθετηρίου στον διακομιστή.
- Στη συνέχεια, πρέπει να δημιουργήσετε ένα τοπικό αντίγραφο του έργου στον υπολογιστή σας. Για να το κάνετε αυτό, κάντε κλικ στο κουμπί "Clone in Desktop" για να μπορείτε να επεξεργαστείτε το έργο στην επιφάνεια εργασίας του Github.
- Επιλέξτε το "Launch Github Desktop" εάν το πρόγραμμα δεν έχει ξεκινήσει ακόμα. Στη συνέχεια, επιλέξτε έναν κατάλογο στον υπολογιστή σας όπου θα αποθηκευτεί ο πηγαίος κώδικας.
- Τώρα μπορείτε να επεξεργαστείτε και να δοκιμάσετε τον πηγαίο κώδικα στον υπολογιστή σας. Για παράδειγμα, μπορείτε να χρησιμοποιήσετε το δωρεάν Atom ως επεξεργαστή ή οποιοδήποτε άλλο επεξεργαστή συμβατό με κώδικα.
Τέλος: Προσφέρετε πιρούνι σε άλλους
Εάν είστε ικανοποιημένοι με τις αλλαγές σας, μπορείτε να τους προσφέρετε στους ιδιοκτήτες του έργου στο github.
- Στην επιφάνεια εργασίας του Github κάντε κλικ στο "Αλλαγές".
- Στην ενότητα "Αλλαγές χωρίς δεσμεύσεις" θα πρέπει τώρα να συντάξετε μια σύντομη περίληψη όλων των αλλαγών που μόλις κάνατε, ώστε οι αλλαγές σας να μπορούν να αντιστοιχιστούν και να ελεγχθούν.
- Εάν θέλετε τώρα να μεταφορτώσετε όλες τις αλλαγές στο έργο, κάντε κλικ στο "Συγχρονισμός". Οι αλλαγές κώδικα θα προσγειωθούν στο διακομιστή github. Ωστόσο, εξακολουθούν να παραμένουν στο πιρούνι τους, δηλαδή στον κλάδο του πηγαίου κώδικα του έργου.
- Τέλος, μεταβείτε στον ιστότοπο github.com και συνδεθείτε. Κάντε κλικ στο "Συγκρίνετε και Τραβήξτε Αίτηση".
- Θα δείτε τώρα μια σελίδα συζήτησης που περιγράφει το πακέτο αλλαγών σας. Εδώ θα πρέπει να εξηγήσετε πειστικά το γιατί και πώς μπορεί να ωφεληθεί το έργο από τις βελτιώσεις σας.
- Στη συνέχεια, κάντε κλικ στο "Send Pull Request" και προσφέρετε τις βελτιώσεις σας στο συγκεκριμένο έργο.
- Οι ιδιοκτήτες του έργου θα εξετάσουν τώρα την πρότασή σας και θα την αποδεχτούν ή θα σας δώσουν πίσω σε εσάς για διευκρινίσεις.
Εδώ παρουσιάζουμε έναν πελάτη Windows για την πλατφόρμα ανοιχτού κώδικα Github.