Git

From belajarwiki
Revision as of 07:02, 1 April 2022 by Aditya (talk | contribs) (Created page with "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to lea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Instalasi

Pada ubuntu

add-apt-repository ppa:git-core/ppa 
apt update
apt install git

Cara menggunakan git

Untuk pertama kali, perlu kita setting beberapa hal:

  1. Login git via terminal
git config --global user.name "username"
git config --global user.email user@mail.com
git config --list
  1. Login dan buat repo di github.com atau gitlab.com
  1. Cara setting agar dapat remote git dari file lokal
git init
git remote add origin git@github.com:UserNameGit/NamaRepository.git
  1. Menambahkan file
git add index.php
git commit -m "first commit"
git push origin master
  1. Mengambil file
git pull origin master


Referensi