Github eğitimi: Bu temel bilgileri bilmeniz gerekir
Bu derste sizi Github ile tanıştıracağız. Github, Git projelerini ve kullanıcılarını yönetebileceğiniz, depolayabileceğiniz ve takip edebileceğiniz bir platformdur.
Github eğitimi: git nedir?
Github'ın ne olduğunu anlayabilmeniz için önce Git kavramını anlamanız gerekir:
- Git, projeler için bir sürüm yönetim yazılımıdır. Eski tezgahlara geri dönmek veya birkaç kişiyle bir proje üzerinde çalışmak için kullanabilirsiniz.
- Git'i işletim sisteminizin komut satırında veya grafik kullanıcı arabirimi olan bir Git istemcisi olan Github Desktop'ta kullanabilirsiniz. Git'i kullanırken aşağıdaki komutları bilmeniz gerekir:
- git clone [URL]: Bir Git deposunu URL'den yerel bilgisayarınıza kopyalayın.
- git init: Git projesini yerel olarak başlat. İsteğe bağlı olarak daha sonra Github'a veya başka bir ana bilgisayara yükleyebilirsiniz.
- git add: İzleme listesine dosya ekleyin. Bu adım, çalışmanızı veri havuzuna yüklemek için zorunludur.
- git commit: değişiklikleri yapın. Bu, istediğiniz zaman geri dönebileceğiniz bir kabin. Uzak bir depoya gönderilmeden önce dosyaları teslim edin.
- git push: Bir push ile tüm taahhütleri Github sunucularındaki veya seçilen diğer sağlayıcıdaki uzak depoya gönderirsiniz.
Öğretici: github nedir?
Github, Git projelerinize ev sahipliği yapar ve bir sosyal ağa benzer özelliklere sahiptir.
- Git ile Github'a kaydedilen projelerinize her yerden erişebilirsiniz.
- Github'da depolanan depolar her zaman herkese açıktır. Böylece diğer kullanıcılar projelerinizi görebilir. Özel depolar sadece aylık bir ücret karşılığında mevcuttur.
- Ayrıca hataları gidererek ve açık kaynak araçlarına aktif olarak katılarak mevcut programlara katkıda bulunabilirsiniz.
- Github çoğunlukla belirli programlama dillerindeki kapsamlı projeler için kullanılır. Bununla birlikte, Github'da basit belgeleri yönetmek de mümkündür.
Öğretici: Git ve Github Kurulumu
Git ve Github ile başlayabilmeniz için bir Github hesabınızın olması ve Git'i yerel olarak yüklemeniz gerekir. Bunu nasıl yapacağınız aşağıda açıklanmıştır:
- Önce Github'da bir hesap oluşturun. Bu oldukça basittir ve hızlı ve kolay bir şekilde yapılabilir.
- Github'ı verimli bir şekilde kullanmak için artık yerel bilgisayarınızda Git'e ihtiyacınız var.
- Şimdi Git'i kurun İşletim sisteminiz için gereken yükleyiciyi seçin.
- Windows'a yeni yüklediğiniz Git Bash'i başlatın. MacOS ve Linux'ta normal terminali başlatın.
- 'Git config --global user.name "[Ad]"' ile şimdi adınızı tanımlamanız gerekir.
- Daha önce olduğu gibi, e-posta adresinizi ayarlamak için 'git config --global user.email "[Mail]"' kullanın. Github'da belirttiğiniz aynı postayı burada kullanın.
Github Eğitimi: Depo kurma
Bir projeyle başlamak istiyorsanız, iki yolla bir havuz oluşturabilirsiniz:
- Github'da, yeni bir havuz oluşturmak için kullanıcı adınızın yanındaki küçük kitabı tıklayın.
- Projenize burada bir ad verin. Yukarıda açıklandığı gibi, projeyi herkese açık hale getirmeniz veya aylık bir ücret ödemeniz gerekir.
- Ardından yeşil "Havuz oluştur" düğmesini tıklayın. Daha sonra, yukarıda açıklandığı gibi git klonunu kullanarak havuzu yerel olarak ekleyebilirsiniz.
- Git init ile yerel olarak bir havuz oluşturun. Daha sonra yerel ve çevrimiçi bir repoyu 'git remote add origin //github.com/[Username[/[Projektname[.git' ile bağlayabilirsiniz).
- Artık projelerinizi yönetebilmeniz ve her yerden kullanabilmeniz için Github'da çevrimiçi bir deponuz var.
Bir sonraki pratik ipucunda Github'da benioku için biçimlendirmeyi nasıl kullanacağınızı okuyabilirsiniz.