Apa itu Git ?

Git adalah perangkat lunak pengontrol versi atau proyek manajemen kode.
langkah langkah sebelum menjalankan git
1. Install terlebih dahulu software/Aplikasi git for windows
2. pastikan sudah memiliki account bitbucket
perintah perintah yang sering di gunakan di git for windows :
. git init
. git clone
. git add
. git status
. git log
. git commit
. git pull
. git push
. git branch

git init
git init ialah perintah untuk membuat repository di lokal.

git clone
git clone ialah perintah untuk mengambil (copy) file dari master (bitbucket).
contoh : git clone https://snufaza@bitbucket.org/znfgit/spin13.git
kemudian tekan enter nanti meminta memasukan Password, selanjutnya jika berhasil silahkan cek di direktori (explorer)

git add
git add ialah perintah untuk menambahkan file pada staging mode (siap commit).
contoh menambah 1 file: git add nama file.php

git rm
berfungsi untuk menghapus file dari repository git, atau meng-unstage (membatalkan staging oleh git add).
contoh menghapus file: git rm <file-to-delete>
contoh menghapus file dari staging: git rm –cached <file-to-unstage>
contoh mengunstage semua file secara recursive: git rm -r –cached .

git commit
git commit ialah perintah yang digunakan setelah kita melakukan git Add, bisa di bilang bahwa git commit ini perintah untuk mengeksekusi file yang telah fix setelah di Add.
contoh : git commit -m “comment”

git pull
git pull ialah perintah yang digunakan untuk mengambil file (update) dari repository (bitbucket).
contoh : git pull

git push
git push ialah perintah yang digunakan untuk menyimpan file baru ke repository
contoh : git push

git status
git status ialah perintah untuk melihat status repository.
contoh : git status

git log
git status ialah perintah untuk melihat file (arsip) di repository .
contoh : git log

2 thoughts on “Apa itu Git ?

Tinggalkan komentar